mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
autoupdate: print updated plugins in chat
This commit is contained in:
parent
34a51d0119
commit
77abd0455d
1 changed files with 4 additions and 4 deletions
|
|
@ -322,7 +322,8 @@ internal class AutoUpdateManager : IServiceType
|
||||||
notification.Progress = (float)updateProgress.PluginsProcessed / updateProgress.TotalPlugins;
|
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.Progress = 1;
|
||||||
notification.UserDismissable = true;
|
notification.UserDismissable = true;
|
||||||
|
|
@ -335,8 +336,7 @@ internal class AutoUpdateManager : IServiceType
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update the notification to show the final state
|
// Update the notification to show the final state
|
||||||
var pluginUpdateStatusEnumerable = pluginStates as PluginUpdateStatus[] ?? pluginStates.ToArray();
|
if (pluginStates.All(x => x.Status == PluginUpdateStatus.StatusKind.Success))
|
||||||
if (pluginUpdateStatusEnumerable.All(x => x.Status == PluginUpdateStatus.StatusKind.Success))
|
|
||||||
{
|
{
|
||||||
notification.Minimized = true;
|
notification.Minimized = true;
|
||||||
|
|
||||||
|
|
@ -355,7 +355,7 @@ internal class AutoUpdateManager : IServiceType
|
||||||
notification.Type = NotificationType.Error;
|
notification.Type = NotificationType.Error;
|
||||||
notification.Content = Locs.NotificationContentUpdatesFailed;
|
notification.Content = Locs.NotificationContentUpdatesFailed;
|
||||||
|
|
||||||
var failedPlugins = pluginUpdateStatusEnumerable
|
var failedPlugins = pluginStates
|
||||||
.Where(x => x.Status != PluginUpdateStatus.StatusKind.Success)
|
.Where(x => x.Status != PluginUpdateStatus.StatusKind.Success)
|
||||||
.Select(x => x.Name).ToList();
|
.Select(x => x.Name).ToList();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue