@@ -31,7 +31,7 @@ public sealed class MainViewModel
31
31
internal bool LoadedApps ;
32
32
33
33
public event TypedEventHandler < object , object ? > ? HideRequested ;
34
-
34
+
35
35
public event TypedEventHandler < object , object ? > ? SummonRequested ;
36
36
37
37
public event TypedEventHandler < object , object ? > ? AppsReady ;
@@ -65,7 +65,8 @@ internal void RequestHide()
65
65
handlers ? . Invoke ( this , null ) ;
66
66
}
67
67
68
- public void Summon ( ) {
68
+ public void Summon ( )
69
+ {
69
70
var handlers = SummonRequested ;
70
71
handlers ? . Invoke ( this , null ) ;
71
72
}
@@ -75,20 +76,26 @@ private static string CreateHash(string? title, string? subtitle)
75
76
return title + subtitle ;
76
77
}
77
78
78
- private string [ ] _recentCommandHashes = [ ] ; // ["SpotifySpotify", "All Apps", "GitHub Issues", "Microsoft/GithubBookmark"];
79
+ private string [ ] _recentCommandHashes = [ ] ;
79
80
80
81
public IEnumerable < IListItem > RecentActions => TopLevelCommands
81
- . Select ( i=> i . Unsafe )
82
- . Where ( ( i ) => {
82
+ . Select ( i => i . Unsafe )
83
+ . Where ( ( i ) =>
84
+ {
83
85
if ( i != null )
84
86
{
85
- try {
87
+ try
88
+ {
86
89
return _recentCommandHashes . Contains ( CreateHash ( i . Title , i . Subtitle ) ) ;
87
- } catch ( COMException ) { return false ; }
90
+ }
91
+ catch ( COMException )
92
+ {
93
+ return false ;
94
+ }
88
95
}
96
+
89
97
return false ;
90
- } )
91
- . Select ( i=> i ! ) ;
98
+ } ) . Select ( i => i ! ) ;
92
99
93
100
public IEnumerable < IListItem > AppItems => LoadedApps ? apps . GetItems ( ) . First ( ) . Items : [ ] ;
94
101
@@ -139,7 +146,7 @@ internal void PushRecentAction(ICommand action)
139
146
return ;
140
147
}
141
148
}
142
- catch ( COMException ) { /* log something */ }
149
+ catch ( COMException ) { /* log something */ }
143
150
}
144
151
}
145
152
}
0 commit comments