From d0bab86377d51234337ab2f682f320e9dd80cc47 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 5 Jan 2025 00:11:03 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher.Core/ProgressBoxEx.xaml.cs | 2 +- Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/ProgressBoxEx.xaml.cs b/Flow.Launcher.Core/ProgressBoxEx.xaml.cs index b6801d2c1..9a32f7303 100644 --- a/Flow.Launcher.Core/ProgressBoxEx.xaml.cs +++ b/Flow.Launcher.Core/ProgressBoxEx.xaml.cs @@ -17,7 +17,7 @@ namespace Flow.Launcher.Core InitializeComponent(); } - public static IProgressBoxEx Show(string caption, Action forceClosed) + public static IProgressBoxEx Show(string caption, Action forceClosed = null) { if (!Application.Current.Dispatcher.CheckAccess()) { diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index f7383ff2f..2ac4be93e 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -158,7 +158,7 @@ namespace Flow.Launcher.Plugin.PluginsManager var totalBytes = response.Content.Headers.ContentLength ?? -1L; var canReportProgress = totalBytes != -1; - if (canReportProgress && (prgBox = Context.API.ShowProgressBox("Download plugin...")) != null) + if (canReportProgress && (prgBox = Context.API.ShowProgressBox($"Download {plugin.Name}...")) != null) { await using var contentStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false); await using var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true);