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)
534
534
return false ;
535
535
}
536
536
537
- Application . Current . MainWindow . Hide ( ) ;
537
+ Context . API . HideMainWindow ( ) ;
538
538
_ = InstallOrUpdateAsync ( plugin ) ;
539
539
540
540
return ShouldHideWindow ;
@@ -572,7 +572,7 @@ internal List<Result> InstallFromLocalPath(string localPath)
572
572
return false ;
573
573
}
574
574
575
- Application . Current . MainWindow . Hide ( ) ;
575
+ Context . API . HideMainWindow ( ) ;
576
576
_ = InstallOrUpdateAsync ( plugin ) ;
577
577
578
578
return ShouldHideWindow ;
@@ -626,7 +626,7 @@ internal async ValueTask<List<Result>> RequestInstallOrUpdateAsync(string search
626
626
return ShouldHideWindow ;
627
627
}
628
628
629
- Application . Current . MainWindow . Hide ( ) ;
629
+ Context . API . HideMainWindow ( ) ;
630
630
_ = InstallOrUpdateAsync ( x ) ; // No need to wait
631
631
return ShouldHideWindow ;
632
632
} ,
@@ -703,7 +703,7 @@ internal List<Result> RequestUninstall(string search)
703
703
Context . API . GetTranslation ( "plugin_pluginsmanager_uninstall_title" ) ,
704
704
MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
705
705
{
706
- Application . Current . MainWindow . Hide ( ) ;
706
+ Context . API . HideMainWindow ( ) ;
707
707
Uninstall ( x . Metadata ) ;
708
708
if ( Settings . AutoRestartAfterChanging )
709
709
{
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ private List<Result> Commands()
333
333
Action = c =>
334
334
{
335
335
// 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 ( ) ;
337
337
338
338
_ = context . API . ReloadAllPluginData ( ) . ContinueWith ( _ =>
339
339
context . API . ShowMsg (
@@ -352,7 +352,7 @@ private List<Result> Commands()
352
352
IcoPath = "Images\\ checkupdate.png" ,
353
353
Action = c =>
354
354
{
355
- Application . Current . MainWindow . Hide ( ) ;
355
+ context . API . HideMainWindow ( ) ;
356
356
context . API . CheckForNewUpdate ( ) ;
357
357
return true ;
358
358
}
You can’t perform that action at this time.
0 commit comments