Skip to content

Commit 4c7c400

Browse files
author
Madery Romain
committed
Fix plugin activation keyword
1 parent f32f99a commit 4c7c400

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

Main.cs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,20 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
2525
{
2626
var results = new List<Result>();
2727
string keyword = query.FirstSearch.Trim().ToLower();
28-
if (keyword.Equals("up") || keyword.Equals("upgrade"))
28+
29+
foreach (var app in upgradableApps.ToList())
2930
{
30-
foreach (var app in upgradableApps.ToList())
31+
results.Add(new Result
3132
{
32-
results.Add(new Result
33+
Title = $"Upgrade {app.Name}",
34+
SubTitle = $"From {app.Version} to {app.AvailableVersion}",
35+
Action = context =>
3336
{
34-
Title = $"Upgrade {app.Name}",
35-
SubTitle = $"From {app.Version} to {app.AvailableVersion}",
36-
Action = context =>
37-
{
38-
_ = PerformUpgradeAsync(app);
39-
return true;
40-
},
41-
IcoPath = "Images\\app.png"
42-
});
43-
}
37+
PerformUpgradeAsync(app);
38+
return true;
39+
},
40+
IcoPath = "Images\\app.png"
41+
});
4442
}
4543

4644
return results;
@@ -134,4 +132,4 @@ public class UpgradableApp
134132
public string AvailableVersion { get; set; }
135133
public string Source { get; set; }
136134
}
137-
}
135+
}

0 commit comments

Comments
 (0)