Skip to content

Commit fe62a03

Browse files
authored
Merge pull request #3389 from Flow-Launcher/show_hide_performance
Remove useless delay
2 parents e3a1489 + 3c3064a commit fe62a03

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,8 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
14581458
mainWindow.ClockPanel.Opacity = opacity;
14591459
mainWindow.SearchIcon.Opacity = opacity;
14601460

1461-
if (QueryText.Length != 0)
1461+
// QueryText sometimes is null when it is just initialized
1462+
if (QueryText != null && QueryText.Length != 0)
14621463
{
14631464
mainWindow.ClockPanel.Visibility = Visibility.Collapsed;
14641465
}
@@ -1554,8 +1555,6 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
15541555
Win32Helper.RestorePreviousKeyboardLayout();
15551556
}
15561557

1557-
await Task.Delay(50);
1558-
15591558
// Update WPF properties
15601559
//MainWindowOpacity = 0;
15611560
MainWindowVisibilityStatus = false;

0 commit comments

Comments
 (0)