diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs index 622ad912b..b932c7d32 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs @@ -7,6 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Dalamud.Plugin.Internal; +using Dalamud.Utility; using Serilog; namespace Dalamud.Interface.Internal.Windows.PluginInstaller; @@ -49,17 +50,29 @@ internal class DalamudChangelogManager foreach (var plugin in this.manager.InstalledPlugins) { - if (plugin.Manifest.IsThirdParty || !plugin.Manifest.IsDip17Plugin) - continue; + if (!plugin.Manifest.IsThirdParty) + { + if (!plugin.Manifest.IsDip17Plugin) + continue; - var pluginChangelogs = await client.GetFromJsonAsync(string.Format( + var pluginChangelogs = await client.GetFromJsonAsync(string.Format( PluginChangelogUrl, plugin.Manifest.InternalName, plugin.Manifest.Dip17Channel)); - changelogs = changelogs.Concat(pluginChangelogs.Versions - .Where(x => x.Dip17Track == plugin.Manifest.Dip17Channel) - .Select(x => new PluginChangelogEntry(plugin, x))); + changelogs = changelogs.Concat(pluginChangelogs.Versions + .Where(x => x.Dip17Track == plugin.Manifest.Dip17Channel) + .Select(x => new PluginChangelogEntry(plugin, x))); + } + else + { + if (plugin.Manifest.Changelog.IsNullOrWhitespace()) + continue; + + changelogs = changelogs.Append(new PluginChangelogEntry(plugin)); + } + + } this.Changelogs = changelogs.OrderByDescending(x => x.Date).ToList(); diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginChangelogEntry.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginChangelogEntry.cs index 495d59d64..247e2d353 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginChangelogEntry.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginChangelogEntry.cs @@ -25,6 +25,20 @@ internal class PluginChangelogEntry : IChangelogEntry this.Date = history.PublishedAt; } + /// + /// Initializes a new instance of the class. + /// + /// The plugin manifest. + public PluginChangelogEntry(LocalPlugin plugin) + { + this.Plugin = plugin; + + this.Version = plugin.Manifest.EffectiveVersion.ToString(); + this.Text = plugin.Manifest.Changelog ?? Loc.Localize("ChangelogNoText", "No changelog for this version."); + this.Author = plugin.Manifest.Author; + this.Date = DateTimeOffset.FromUnixTimeSeconds(this.Plugin.Manifest.LastUpdate).DateTime; + } + /// /// Gets the respective plugin. ///