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
12 changes: 6 additions & 6 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,10 +1464,10 @@ public bool ShouldIgnoreHotkeys()

public void Show()
{
// Invoke on UI thread
Application.Current.Dispatcher.Invoke(() =>
// When application is exiting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
{
// When application is exitting, the Application.Current will be null
// When application is exiting, the Application.Current will be null
if (Application.Current?.MainWindow is MainWindow mainWindow)
{
// 📌 Remove DWM Cloak (Make the window visible normally)
Expand Down Expand Up @@ -1539,10 +1539,10 @@ public async void Hide()
break;
}

// Invoke on UI thread
Application.Current.Dispatcher.Invoke(() =>
// When application is exiting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
{
// When application is exitting, the Application.Current will be null
// When application is exiting, the Application.Current will be null
if (Application.Current?.MainWindow is MainWindow mainWindow)
{
// Set clock and search icon opacity
Expand Down
Loading