Improve code comment

This commit is contained in:
Jack251970 2025-04-04 10:02:47 +08:00
parent 95b38d21af
commit e4577eb23e

View file

@ -57,16 +57,18 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
#pragma warning disable VSTHRD100 // Avoid async void methods
public async void RestartApp()
{
_mainVM.Hide();
// we must manually save
// We must manually save
// UpdateManager.RestartApp() will call Environment.Exit(0)
// which will cause ungraceful exit
SaveAppAllSettings();
// wait for all image caches to be saved
// Wait for all image caches to be saved before restarting
await ImageLoader.WaitSaveAsync();
// Restart requires Squirrel's Update.exe to be present in the parent folder,
@ -75,6 +77,8 @@ namespace Flow.Launcher
UpdateManager.RestartApp(Constant.ApplicationFileName);
}
#pragma warning restore VSTHRD100 // Avoid async void methods
public void ShowMainWindow() => _mainVM.Show();
public void HideMainWindow() => _mainVM.Hide();