diff --git a/Flow.Launcher/ProgressBoxEx.xaml.cs b/Flow.Launcher/ProgressBoxEx.xaml.cs index 37ee2b0cb..a04ed0576 100644 --- a/Flow.Launcher/ProgressBoxEx.xaml.cs +++ b/Flow.Launcher/ProgressBoxEx.xaml.cs @@ -46,12 +46,9 @@ namespace Flow.Launcher { if (!Application.Current.Dispatcher.CheckAccess()) { - await Application.Current.Dispatcher.InvokeAsync(async () => + await Application.Current.Dispatcher.InvokeAsync(() => { - if (prgBox != null) - { - await prgBox.CloseAsync(); - } + prgBox?.Close(); }); } } @@ -80,17 +77,6 @@ namespace Flow.Launcher } } - private async Task CloseAsync() - { - if (!Application.Current.Dispatcher.CheckAccess()) - { - await Application.Current.Dispatcher.InvokeAsync(Close); - return; - } - - Close(); - } - private void KeyEsc_OnPress(object sender, ExecutedRoutedEventArgs e) { ForceClose();