From 77abd0455da611c51329bc4f6842f3098d6332ec Mon Sep 17 00:00:00 2001 From: goat Date: Mon, 8 Jul 2024 19:35:45 +0200 Subject: [PATCH] autoupdate: print updated plugins in chat --- Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs index 88fa5d23b..de7eb1c1c 100644 --- a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs +++ b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs @@ -322,7 +322,8 @@ internal class AutoUpdateManager : IServiceType notification.Progress = (float)updateProgress.PluginsProcessed / updateProgress.TotalPlugins; }; - var pluginStates = await this.pluginManager.UpdatePluginsAsync(updatablePlugins, this.isDryRun.Value, true, progress); + var pluginStates = (await this.pluginManager.UpdatePluginsAsync(updatablePlugins, this.isDryRun.Value, true, progress)).ToList(); + this.pluginManager.PrintUpdatedPlugins(pluginStates, Loc.Localize("DalamudPluginAutoUpdate", "The following plugins were auto-updated:")); notification.Progress = 1; notification.UserDismissable = true; @@ -335,8 +336,7 @@ internal class AutoUpdateManager : IServiceType }; // Update the notification to show the final state - var pluginUpdateStatusEnumerable = pluginStates as PluginUpdateStatus[] ?? pluginStates.ToArray(); - if (pluginUpdateStatusEnumerable.All(x => x.Status == PluginUpdateStatus.StatusKind.Success)) + if (pluginStates.All(x => x.Status == PluginUpdateStatus.StatusKind.Success)) { notification.Minimized = true; @@ -355,7 +355,7 @@ internal class AutoUpdateManager : IServiceType notification.Type = NotificationType.Error; notification.Content = Locs.NotificationContentUpdatesFailed; - var failedPlugins = pluginUpdateStatusEnumerable + var failedPlugins = pluginStates .Where(x => x.Status != PluginUpdateStatus.StatusKind.Success) .Select(x => x.Name).ToList();