Add Delay to Opacity when Main Window Deactive

This commit is contained in:
DB p 2021-11-19 09:17:48 +09:00
parent a301d8efab
commit eaf0649d97
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,6 @@ namespace Flow.Launcher.Helper
{
var window = Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.GetType() == typeof(T))
?? (T)Activator.CreateInstance(typeof(T), args);
Application.Current.MainWindow.Hide();
// Fix UI bug
// Add `window.WindowState = WindowState.Normal`

View file

@ -315,9 +315,10 @@ namespace Flow.Launcher
}
private void OnDeactivated(object sender, EventArgs e)
private async void OnDeactivated(object sender, EventArgs e)
{
_viewModel.Save();
await Task.Delay(100);
if (_settings.HideWhenDeactive)
{
_viewModel.Hide();