Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,8 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
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)
Copy link

Copilot AI Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider using string.IsNullOrEmpty(QueryText) for clarity and conciseness, ensuring the check covers both null and empty cases.

Suggested change
if (QueryText != null && QueryText.Length != 0)
if (!string.IsNullOrEmpty(QueryText))

Copilot uses AI. Check for mistakes.

{
mainWindow.ClockPanel.Visibility = Visibility.Collapsed;
}
Expand Down Expand Up @@ -1554,8 +1555,6 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
Win32Helper.RestorePreviousKeyboardLayout();
}

await Task.Delay(50);

// Update WPF properties
//MainWindowOpacity = 0;
MainWindowVisibilityStatus = false;
Expand Down
Loading