Merge pull request #3389 from Flow-Launcher/show_hide_performance

Remove useless delay
This commit is contained in:
Jack Ye 2025-03-27 19:35:32 +08:00 committed by GitHub
commit fe62a03b4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1458,7 +1458,8 @@ namespace Flow.Launcher.ViewModel
mainWindow.ClockPanel.Opacity = opacity;
mainWindow.SearchIcon.Opacity = opacity;
if (QueryText.Length != 0)
// QueryText sometimes is null when it is just initialized
if (QueryText != null && QueryText.Length != 0)
{
mainWindow.ClockPanel.Visibility = Visibility.Collapsed;
}
@ -1554,8 +1555,6 @@ namespace Flow.Launcher.ViewModel
Win32Helper.RestorePreviousKeyboardLayout();
}
await Task.Delay(50);
// Update WPF properties
//MainWindowOpacity = 0;
MainWindowVisibilityStatus = false;