File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Flow.Launcher.Plugin.PluginsManager Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ internal List<Result> InstallFromWeb(string url)
534534 return false ;
535535 }
536536
537- Application . Current . MainWindow . Hide ( ) ;
537+ Context . API . HideMainWindow ( ) ;
538538 _ = InstallOrUpdateAsync ( plugin ) ;
539539
540540 return ShouldHideWindow ;
@@ -572,7 +572,7 @@ internal List<Result> InstallFromLocalPath(string localPath)
572572 return false ;
573573 }
574574
575- Application . Current . MainWindow . Hide ( ) ;
575+ Context . API . HideMainWindow ( ) ;
576576 _ = InstallOrUpdateAsync ( plugin ) ;
577577
578578 return ShouldHideWindow ;
@@ -626,7 +626,7 @@ internal async ValueTask<List<Result>> RequestInstallOrUpdateAsync(string search
626626 return ShouldHideWindow ;
627627 }
628628
629- Application . Current . MainWindow . Hide ( ) ;
629+ Context . API . HideMainWindow ( ) ;
630630 _ = InstallOrUpdateAsync ( x ) ; // No need to wait
631631 return ShouldHideWindow ;
632632 } ,
@@ -703,7 +703,7 @@ internal List<Result> RequestUninstall(string search)
703703 Context . API . GetTranslation ( "plugin_pluginsmanager_uninstall_title" ) ,
704704 MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
705705 {
706- Application . Current . MainWindow . Hide ( ) ;
706+ Context . API . HideMainWindow ( ) ;
707707 Uninstall ( x . Metadata ) ;
708708 if ( Settings . AutoRestartAfterChanging )
709709 {
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ private List<Result> Commands()
333333 Action = c =>
334334 {
335335 // Hide the window first then show msg after done because sometimes the reload could take a while, so not to make user think it's frozen.
336- Application . Current . MainWindow . Hide ( ) ;
336+ context . API . HideMainWindow ( ) ;
337337
338338 _ = context . API . ReloadAllPluginData ( ) . ContinueWith ( _ =>
339339 context . API . ShowMsg (
@@ -352,7 +352,7 @@ private List<Result> Commands()
352352 IcoPath = "Images\\ checkupdate.png" ,
353353 Action = c =>
354354 {
355- Application . Current . MainWindow . Hide ( ) ;
355+ context . API . HideMainWindow ( ) ;
356356 context . API . CheckForNewUpdate ( ) ;
357357 return true ;
358358 }
You can’t perform that action at this time.
0 commit comments