1111using System . Threading . Tasks ;
1212using System . Windows ;
1313using CommunityToolkit . Mvvm . DependencyInjection ;
14- using Squirrel ;
1514using Flow . Launcher . Core ;
1615using Flow . Launcher . Core . Plugin ;
16+ using Flow . Launcher . Core . Resource ;
1717using Flow . Launcher . Helper ;
1818using Flow . Launcher . Infrastructure ;
1919using Flow . Launcher . Infrastructure . Http ;
2727using Flow . Launcher . Plugin . SharedCommands ;
2828using Flow . Launcher . ViewModel ;
2929using JetBrains . Annotations ;
30- using Flow . Launcher . Core . Resource ;
30+ using Squirrel ;
3131
3232namespace Flow . Launcher
3333{
@@ -78,7 +78,11 @@ public void RestartApp()
7878
7979 public bool IsMainWindowVisible ( ) => _mainVM . MainWindowVisibilityStatus ;
8080
81- public event VisibilityChangedEventHandler VisibilityChanged { add => _mainVM . VisibilityChanged += value ; remove => _mainVM . VisibilityChanged -= value ; }
81+ public event VisibilityChangedEventHandler VisibilityChanged
82+ {
83+ add => _mainVM . VisibilityChanged += value ;
84+ remove => _mainVM . VisibilityChanged -= value ;
85+ }
8286
8387 // Must use Ioc.Default.GetRequiredService<Updater>() to avoid circular dependency
8488 public void CheckForNewUpdate ( ) => _ = Ioc . Default . GetRequiredService < Updater > ( ) . UpdateAppAsync ( false ) ;
@@ -162,13 +166,14 @@ public void CopyToClipboard(string stringToCopy, bool directCopy = false, bool s
162166 public MatchResult FuzzySearch ( string query , string stringToCompare ) =>
163167 StringMatcher . FuzzySearch ( query , stringToCompare ) ;
164168
165- public Task < string > HttpGetStringAsync ( string url , CancellationToken token = default ) => Http . GetAsync ( url , token ) ;
169+ public Task < string > HttpGetStringAsync ( string url , CancellationToken token = default ) =>
170+ Http . GetAsync ( url , token ) ;
166171
167172 public Task < Stream > HttpGetStreamAsync ( string url , CancellationToken token = default ) =>
168173 Http . GetStreamAsync ( url , token ) ;
169174
170175 public Task HttpDownloadAsync ( [ NotNull ] string url , [ NotNull ] string filePath , Action < double > reportProgress = null ,
171- CancellationToken token = default ) => Http . DownloadAsync ( url , filePath , reportProgress , token ) ;
176+ CancellationToken token = default ) => Http . DownloadAsync ( url , filePath , reportProgress , token ) ;
172177
173178 public void AddActionKeyword ( string pluginId , string newActionKeyword ) =>
174179 PluginManager . AddActionKeyword ( pluginId , newActionKeyword ) ;
@@ -190,8 +195,8 @@ public void LogWarn(string className, string message, [CallerMemberName] string
190195 public void LogError ( string className , string message , [ CallerMemberName ] string methodName = "" ) =>
191196 Log . Error ( className , message , methodName ) ;
192197
193- public void LogException ( string className , string message , Exception e ,
194- [ CallerMemberName ] string methodName = "" ) => Log . Exception ( className , message , e , methodName ) ;
198+ public void LogException ( string className , string message , Exception e , [ CallerMemberName ] string methodName = "" ) =>
199+ Log . Exception ( className , message , e , methodName ) ;
195200
196201 private readonly ConcurrentDictionary < Type , object > _pluginJsonStorages = new ( ) ;
197202
@@ -204,7 +209,7 @@ public void RemovePluginSettings(string assemblyName)
204209 var name = value . GetType ( ) . GetField ( "AssemblyName" ) ? . GetValue ( value ) ? . ToString ( ) ;
205210 if ( name == assemblyName )
206211 {
207- _pluginJsonStorages . Remove ( key , out var pluginJsonStorage ) ;
212+ _pluginJsonStorages . Remove ( key , out var _ ) ;
208213 }
209214 }
210215 }
@@ -333,17 +338,23 @@ public bool IsGameModeOn()
333338
334339 private readonly List < Func < int , int , SpecialKeyState , bool > > _globalKeyboardHandlers = new ( ) ;
335340
336- public void RegisterGlobalKeyboardCallback ( Func < int , int , SpecialKeyState , bool > callback ) => _globalKeyboardHandlers . Add ( callback ) ;
337- public void RemoveGlobalKeyboardCallback ( Func < int , int , SpecialKeyState , bool > callback ) => _globalKeyboardHandlers . Remove ( callback ) ;
341+ public void RegisterGlobalKeyboardCallback ( Func < int , int , SpecialKeyState , bool > callback ) =>
342+ _globalKeyboardHandlers . Add ( callback ) ;
343+
344+ public void RemoveGlobalKeyboardCallback ( Func < int , int , SpecialKeyState , bool > callback ) =>
345+ _globalKeyboardHandlers . Remove ( callback ) ;
338346
339347 public void ReQuery ( bool reselect = true ) => _mainVM . ReQuery ( reselect ) ;
340348
341349 public void BackToQueryResults ( ) => _mainVM . BackToQueryResults ( ) ;
342350
343- public MessageBoxResult ShowMsgBox ( string messageBoxText , string caption = "" , MessageBoxButton button = MessageBoxButton . OK , MessageBoxImage icon = MessageBoxImage . None , MessageBoxResult defaultResult = MessageBoxResult . OK ) =>
351+ public MessageBoxResult ShowMsgBox ( string messageBoxText , string caption = "" ,
352+ MessageBoxButton button = MessageBoxButton . OK , MessageBoxImage icon = MessageBoxImage . None ,
353+ MessageBoxResult defaultResult = MessageBoxResult . OK ) =>
344354 MessageBoxEx . Show ( messageBoxText , caption , button , icon , defaultResult ) ;
345355
346- public Task ShowProgressBoxAsync ( string caption , Func < Action < double > , Task > reportProgressAsync , Action cancelProgress = null ) => ProgressBoxEx . ShowAsync ( caption , reportProgressAsync , cancelProgress ) ;
356+ public Task ShowProgressBoxAsync ( string caption , Func < Action < double > , Task > reportProgressAsync ,
357+ Action cancelProgress = null ) => ProgressBoxEx . ShowAsync ( caption , reportProgressAsync , cancelProgress ) ;
347358
348359 #endregion
349360
0 commit comments