Skip to content

Commit 029cb38

Browse files
committed
Fix progress box action under ui thread
1 parent df3cb58 commit 029cb38

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Flow.Launcher/ProgressBoxEx.xaml.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
3333
prgBox.Show();
3434
});
3535
}
36+
else
37+
{
38+
prgBox = new ProgressBoxEx(forceClosed)
39+
{
40+
Title = caption
41+
};
42+
prgBox.TitleTextBlock.Text = caption;
43+
prgBox.Show();
44+
}
3645

3746
await reportProgressAsync(prgBox.ReportProgress).ConfigureAwait(false);
3847
}
@@ -51,6 +60,10 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
5160
prgBox?.Close();
5261
});
5362
}
63+
else
64+
{
65+
prgBox?.Close();
66+
}
5467
}
5568
}
5669

0 commit comments

Comments
 (0)