diff --git a/Dalamud/Configuration/Internal/DalamudConfiguration.cs b/Dalamud/Configuration/Internal/DalamudConfiguration.cs index e5348d999..ca029307d 100644 --- a/Dalamud/Configuration/Internal/DalamudConfiguration.cs +++ b/Dalamud/Configuration/Internal/DalamudConfiguration.cs @@ -80,10 +80,9 @@ internal sealed class DalamudConfiguration : IInternalDisposableService public string? LastVersion { get; set; } = null; /// - /// Gets or sets a value indicating the last seen FTUE version. - /// Unused for now, added to prevent existing users from seeing level 0 FTUE. + /// Gets or sets a dictionary of seen FTUE levels. /// - public int SeenFtueLevel { get; set; } = 1; + public Dictionary SeenFtueLevels { get; set; } = new(); /// /// Gets or sets the last loaded Dalamud version. diff --git a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs index 16e70d9e7..906fda2e4 100644 --- a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Linq; using System.Numerics; @@ -78,8 +79,7 @@ internal sealed class ChangelogWindow : Window, IDisposable private AutoUpdateBehavior? chosenAutoUpdateBehavior; - private int currentFtueLevel; - private int updatedFtueLevel; + private Dictionary currentFtueLevels = new(); /// /// Initializes a new instance of the class. @@ -152,7 +152,7 @@ internal sealed class ChangelogWindow : Window, IDisposable this.chosenAutoUpdateBehavior = null; - this.currentFtueLevel = Service.Get().SeenFtueLevel; + this.currentFtueLevels = Service.Get().SeenFtueLevels; base.OnOpen(); } @@ -172,7 +172,7 @@ internal sealed class ChangelogWindow : Window, IDisposable configuration.AutoUpdateBehavior = this.chosenAutoUpdateBehavior.Value; } - configuration.SeenFtueLevel = this.updatedFtueLevel; + configuration.SeenFtueLevels = this.currentFtueLevels; configuration.QueueSave(); } @@ -360,11 +360,11 @@ internal sealed class ChangelogWindow : Window, IDisposable this.apiBumpExplainerTexture.Value.ImGuiHandle, this.apiBumpExplainerTexture.Value.Size); - if (this.currentFtueLevel < FtueLevels.AutoUpdateBehavior) + if (!this.currentFtueLevels.TryGetValue(FtueLevels.AutoUpdate.Name, out var autoUpdateLevel) || autoUpdateLevel < FtueLevels.AutoUpdate.AutoUpdateInitial) { if (DrawNextButton(State.AskAutoUpdate)) { - this.updatedFtueLevel = this.currentFtueLevel = FtueLevels.AutoUpdateBehavior; + this.currentFtueLevels[FtueLevels.AutoUpdate.Name] = FtueLevels.AutoUpdate.AutoUpdateInitial; } } else @@ -520,7 +520,10 @@ internal sealed class ChangelogWindow : Window, IDisposable private static class FtueLevels { - public const int Default = 1; - public const int AutoUpdateBehavior = 2; + public static class AutoUpdate + { + public const string Name = "AutoUpdate"; + public const int AutoUpdateInitial = 1; + } } }