Skip to content

Commit f701724

Browse files
committed
Code improvment
1 parent d190029 commit f701724

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Main.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ public Task InitAsync(PluginInitContext context)
2828

2929
public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
3030
{
31-
if (upgradableApps == null || !upgradableApps.Any())
32-
{
33-
return new List<Result>();
34-
}
31+
await Task.Yield();
3532

3633
var results = new List<Result>();
3734
string keyword = query.FirstSearch.Trim().ToLower();
3835

36+
if (upgradableApps == null || !upgradableApps.Any())
37+
{
38+
return results;
39+
}
3940

4041
foreach (var app in upgradableApps.ToList())
4142
{
@@ -63,6 +64,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
6364
}
6465

6566

67+
6668
private async Task PerformUpgradeAsync(UpgradableApp app)
6769
{
6870
Context.API.ShowMsg($"Attempting to update {app.Name}...");

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "AppUpgrader",
55
"Description": "Allows you to keep your applications up using winget",
66
"Author": "Exarilo",
7-
"Version": "1.0.4",
7+
"Version": "1.0.5",
88
"Language": "csharp",
99
"Website": "https://github.com/Exarilo/Flow.Launcher.Plugin.AppUpgrader",
1010
"IcoPath": "Images\\app.png",

0 commit comments

Comments
 (0)