refactor UpdatePluginsAsync() to take a list of plugins to update instead

This commit is contained in:
goat 2024-06-15 18:35:47 +02:00
parent 8d18940108
commit bc2edf765f
3 changed files with 51 additions and 38 deletions

View file

@ -711,8 +711,12 @@ internal class PluginInstallerWindow : Window, IDisposable
{
this.updateStatus = OperationStatus.InProgress;
this.loadingIndicatorKind = LoadingIndicatorKind.UpdatingAll;
var toUpdate = this.pluginListUpdatable
.Where(x => x.InstalledPlugin.IsLoaded)
.ToList();
Task.Run(() => pluginManager.UpdatePluginsAsync(true, false))
Task.Run(() => pluginManager.UpdatePluginsAsync(toUpdate, false))
.ContinueWith(task =>
{
this.updateStatus = OperationStatus.Complete;