From c698ec93157363df0444f1d3917a7f31779a6a9e Mon Sep 17 00:00:00 2001 From: goat Date: Tue, 25 Jun 2024 23:58:09 +0200 Subject: [PATCH] autoupdate: list which plugins are updateable in the notification --- .../Internal/AutoUpdate/AutoUpdateManager.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs index 07f023006..275516711 100644 --- a/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs +++ b/Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs @@ -366,7 +366,7 @@ internal class AutoUpdateManager : IServiceType var notification = this.GetBaseNotification(new Notification { Title = Locs.NotificationTitleUpdatesAvailable, - Content = Locs.NotificationContentUpdatesAvailable(updatablePlugins.Count), + Content = Locs.NotificationContentUpdatesAvailable(updatablePlugins), MinimizedText = Locs.NotificationContentUpdatesAvailableMinimized(updatablePlugins.Count), Type = NotificationType.Info, InitialDuration = TimeSpan.MaxValue, @@ -471,11 +471,18 @@ internal class AutoUpdateManager : IServiceType public static string NotificationContentUpdatesFailed => Loc.Localize("AutoUpdateUpdatesFailedContent", "Some plugins failed to update. Please check the plugin installer for more information."); public static string NotificationContentUpdatesFailedMinimized => Loc.Localize("AutoUpdateUpdatesFailedContentMinimized", "Plugins failed to update."); - - public static string NotificationContentUpdatesAvailable(int numUpdates) - => numUpdates == 1 ? - Loc.Localize("AutoUpdateUpdatesAvailableContentSingular", "There is a plugin that can be updated.") : - string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContentPlural", "There are {0} plugins that can be updated."), numUpdates); + + public static string NotificationContentUpdatesAvailable(ICollection updatablePlugins) + => (updatablePlugins.Count == 1 + ? Loc.Localize( + "AutoUpdateUpdatesAvailableContentSingular", + "There is a plugin that can be updated:") + : string.Format( + Loc.Localize( + "AutoUpdateUpdatesAvailableContentPlural", + "There are {0} plugins that can be updated:"), + updatablePlugins.Count)) + + "\n\n" + string.Join(",", updatablePlugins.Select(x => x.InstalledPlugin.Manifest.Name)); public static string NotificationContentUpdatesAvailableMinimized(int numUpdates) => numUpdates == 1 ?