From 029cb38c61855756cfcc4e75dc833c987bcbc50b Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 11 Jan 2025 13:19:45 +0800 Subject: [PATCH] Fix progress box action under ui thread --- Flow.Launcher/ProgressBoxEx.xaml.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Flow.Launcher/ProgressBoxEx.xaml.cs b/Flow.Launcher/ProgressBoxEx.xaml.cs index a04ed0576..7c55d62c0 100644 --- a/Flow.Launcher/ProgressBoxEx.xaml.cs +++ b/Flow.Launcher/ProgressBoxEx.xaml.cs @@ -33,6 +33,15 @@ namespace Flow.Launcher prgBox.Show(); }); } + else + { + prgBox = new ProgressBoxEx(forceClosed) + { + Title = caption + }; + prgBox.TitleTextBlock.Text = caption; + prgBox.Show(); + } await reportProgressAsync(prgBox.ReportProgress).ConfigureAwait(false); } @@ -51,6 +60,10 @@ namespace Flow.Launcher prgBox?.Close(); }); } + else + { + prgBox?.Close(); + } } }