diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 9b2ad2d40..2bfc9587c 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -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;