Dalamud/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogEntry.cs
goat 448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00

47 lines
1.3 KiB
C#

namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
/// <summary>
/// Class representing a Dalamud changelog.
/// </summary>
internal class DalamudChangelogEntry : IChangelogEntry
{
private readonly DalamudChangelog changelog;
/// <summary>
/// Initializes a new instance of the <see cref="DalamudChangelogEntry"/> class.
/// </summary>
/// <param name="changelog">The changelog.</param>
public DalamudChangelogEntry(DalamudChangelog changelog)
{
this.changelog = changelog;
var changelogText = string.Empty;
for (var i = 0; i < changelog.Changes.Count; i++)
{
var change = changelog.Changes[i];
changelogText += $"{change.Message} (by {change.Author})";
if (i < changelog.Changes.Count - 1)
{
changelogText += Environment.NewLine;
}
}
this.Text = changelogText;
}
/// <inheritdoc/>
public string Title => "Dalamud Core";
/// <inheritdoc/>
public string Version => this.changelog.Version;
/// <inheritdoc/>
public string Text { get; init; }
/// <inheritdoc/>
public string? Author { get; private set; } = null;
/// <inheritdoc/>
public DateTime Date => this.changelog.Date;
}