Improve code quality

This commit is contained in:
Jack251970 2025-01-05 00:11:03 +08:00
parent 54f02e04e6
commit d0bab86377
2 changed files with 2 additions and 2 deletions

View file

@ -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())
{

View file

@ -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);