mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code quality
This commit is contained in:
parent
cc921c7d29
commit
df3cb58c6c
1 changed files with 2 additions and 16 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue