File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments