Merge pull request #3251 from Jack251970/hide_window

Use api function to hide window
This commit is contained in:
VictoriousRaptor 2025-02-18 13:35:26 +08:00 committed by GitHub
commit 6c22aea9d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -534,7 +534,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return false;
}
Application.Current.MainWindow.Hide();
Context.API.HideMainWindow();
_ = InstallOrUpdateAsync(plugin);
return ShouldHideWindow;
@ -572,7 +572,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return false;
}
Application.Current.MainWindow.Hide();
Context.API.HideMainWindow();
_ = InstallOrUpdateAsync(plugin);
return ShouldHideWindow;
@ -626,7 +626,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return ShouldHideWindow;
}
Application.Current.MainWindow.Hide();
Context.API.HideMainWindow();
_ = InstallOrUpdateAsync(x); // No need to wait
return ShouldHideWindow;
},
@ -703,7 +703,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Context.API.GetTranslation("plugin_pluginsmanager_uninstall_title"),
MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
Application.Current.MainWindow.Hide();
Context.API.HideMainWindow();
Uninstall(x.Metadata);
if (Settings.AutoRestartAfterChanging)
{

View file

@ -333,7 +333,7 @@ namespace Flow.Launcher.Plugin.Sys
Action = c =>
{
// 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.
Application.Current.MainWindow.Hide();
context.API.HideMainWindow();
_ = context.API.ReloadAllPluginData().ContinueWith(_ =>
context.API.ShowMsg(
@ -352,7 +352,7 @@ namespace Flow.Launcher.Plugin.Sys
IcoPath = "Images\\checkupdate.png",
Action = c =>
{
Application.Current.MainWindow.Hide();
context.API.HideMainWindow();
context.API.CheckForNewUpdate();
return true;
}