Skip to content

Commit df3cb58

Browse files
committed
Improve code quality
1 parent cc921c7 commit df3cb58

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

Flow.Launcher/ProgressBoxEx.xaml.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
4646
{
4747
if (!Application.Current.Dispatcher.CheckAccess())
4848
{
49-
await Application.Current.Dispatcher.InvokeAsync(async () =>
49+
await Application.Current.Dispatcher.InvokeAsync(() =>
5050
{
51-
if (prgBox != null)
52-
{
53-
await prgBox.CloseAsync();
54-
}
51+
prgBox?.Close();
5552
});
5653
}
5754
}
@@ -80,17 +77,6 @@ private void ReportProgress(double progress)
8077
}
8178
}
8279

83-
private async Task CloseAsync()
84-
{
85-
if (!Application.Current.Dispatcher.CheckAccess())
86-
{
87-
await Application.Current.Dispatcher.InvokeAsync(Close);
88-
return;
89-
}
90-
91-
Close();
92-
}
93-
9480
private void KeyEsc_OnPress(object sender, ExecutedRoutedEventArgs e)
9581
{
9682
ForceClose();

0 commit comments

Comments
 (0)