mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code comment
This commit is contained in:
parent
95b38d21af
commit
e4577eb23e
1 changed files with 6 additions and 2 deletions
|
|
@ -57,16 +57,18 @@ namespace Flow.Launcher
|
||||||
_mainVM.ChangeQueryText(query, requery);
|
_mainVM.ChangeQueryText(query, requery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable VSTHRD100 // Avoid async void methods
|
||||||
|
|
||||||
public async void RestartApp()
|
public async void RestartApp()
|
||||||
{
|
{
|
||||||
_mainVM.Hide();
|
_mainVM.Hide();
|
||||||
|
|
||||||
// we must manually save
|
// We must manually save
|
||||||
// UpdateManager.RestartApp() will call Environment.Exit(0)
|
// UpdateManager.RestartApp() will call Environment.Exit(0)
|
||||||
// which will cause ungraceful exit
|
// which will cause ungraceful exit
|
||||||
SaveAppAllSettings();
|
SaveAppAllSettings();
|
||||||
|
|
||||||
// wait for all image caches to be saved
|
// Wait for all image caches to be saved before restarting
|
||||||
await ImageLoader.WaitSaveAsync();
|
await ImageLoader.WaitSaveAsync();
|
||||||
|
|
||||||
// Restart requires Squirrel's Update.exe to be present in the parent folder,
|
// Restart requires Squirrel's Update.exe to be present in the parent folder,
|
||||||
|
|
@ -75,6 +77,8 @@ namespace Flow.Launcher
|
||||||
UpdateManager.RestartApp(Constant.ApplicationFileName);
|
UpdateManager.RestartApp(Constant.ApplicationFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning restore VSTHRD100 // Avoid async void methods
|
||||||
|
|
||||||
public void ShowMainWindow() => _mainVM.Show();
|
public void ShowMainWindow() => _mainVM.Show();
|
||||||
|
|
||||||
public void HideMainWindow() => _mainVM.Hide();
|
public void HideMainWindow() => _mainVM.Hide();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue