feat(config): bump schema v20→v21 with ScreenshotMode field
Adds persisted ScreenshotMode flag to Configuration (was previously a ChatLogWindow-instance field in v1.5.6). Schema bump is additive — no breaking change. SelfTest renamed V20→V21 with matching version-gate flip and new touch-test for the new field. Pre-flight for v1.7.1 PayloadHandler-Pipeline Resurrection.
This commit is contained in:
@@ -35,7 +35,7 @@ public class ConfigKeyBind
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Configuration : IPluginConfiguration
|
public class Configuration : IPluginConfiguration
|
||||||
{
|
{
|
||||||
internal const int LatestVersion = 20;
|
internal const int LatestVersion = 21;
|
||||||
|
|
||||||
public int Version { get; set; } = LatestVersion;
|
public int Version { get; set; } = LatestVersion;
|
||||||
|
|
||||||
@@ -172,6 +172,7 @@ public class Configuration : IPluginConfiguration
|
|||||||
public HashSet<Guid> InactivityHideExtraChatChannels = [];
|
public HashSet<Guid> InactivityHideExtraChatChannels = [];
|
||||||
public bool ShowHideButton = true;
|
public bool ShowHideButton = true;
|
||||||
public bool NativeItemTooltips = true;
|
public bool NativeItemTooltips = true;
|
||||||
|
public bool ScreenshotMode;
|
||||||
public bool PrettierTimestamps = true;
|
public bool PrettierTimestamps = true;
|
||||||
public bool MoreCompactPretty;
|
public bool MoreCompactPretty;
|
||||||
public bool HideSameTimestamps = true;
|
public bool HideSameTimestamps = true;
|
||||||
@@ -285,6 +286,7 @@ public class Configuration : IPluginConfiguration
|
|||||||
InactivityHideExtraChatChannels = other.InactivityHideExtraChatChannels.ToHashSet();
|
InactivityHideExtraChatChannels = other.InactivityHideExtraChatChannels.ToHashSet();
|
||||||
ShowHideButton = other.ShowHideButton;
|
ShowHideButton = other.ShowHideButton;
|
||||||
NativeItemTooltips = other.NativeItemTooltips;
|
NativeItemTooltips = other.NativeItemTooltips;
|
||||||
|
ScreenshotMode = other.ScreenshotMode;
|
||||||
PrettierTimestamps = other.PrettierTimestamps;
|
PrettierTimestamps = other.PrettierTimestamps;
|
||||||
MoreCompactPretty = other.MoreCompactPretty;
|
MoreCompactPretty = other.MoreCompactPretty;
|
||||||
HideSameTimestamps = other.HideSameTimestamps;
|
HideSameTimestamps = other.HideSameTimestamps;
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
|
|||||||
+ "Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.10."
|
+ "Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.10."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Config.Version = 20;
|
Config.Version = 21;
|
||||||
|
|
||||||
// Unpinned TempTabs are session-only and dropped on every load. Pinned
|
// Unpinned TempTabs are session-only and dropped on every load. Pinned
|
||||||
// TempTabs survive reload — Jin's tester feedback (v1.4.7).
|
// TempTabs survive reload — Jin's tester feedback (v1.4.7).
|
||||||
@@ -347,7 +347,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
|
|||||||
new SelfTests.SettingsWindowOpenStep(this),
|
new SelfTests.SettingsWindowOpenStep(this),
|
||||||
new SelfTests.OnOpenMainUiRoutesMainWindowStep(this),
|
new SelfTests.OnOpenMainUiRoutesMainWindowStep(this),
|
||||||
new SelfTests.TypingIpcStateStep(this),
|
new SelfTests.TypingIpcStateStep(this),
|
||||||
new SelfTests.ConfigMigrationV20Step(this),
|
new SelfTests.ConfigMigrationV21Step(this),
|
||||||
new SelfTests.HoverSheenAllocStep(this),
|
new SelfTests.HoverSheenAllocStep(this),
|
||||||
new SelfTests.HonorificHeaderRenderStep(this),
|
new SelfTests.HonorificHeaderRenderStep(this),
|
||||||
new SelfTests.PerformanceBaselineStep(this),
|
new SelfTests.PerformanceBaselineStep(this),
|
||||||
|
|||||||
+9
-8
@@ -3,27 +3,27 @@ using Dalamud.Plugin.SelfTest;
|
|||||||
|
|
||||||
namespace HellionChat.SelfTests;
|
namespace HellionChat.SelfTests;
|
||||||
|
|
||||||
// Pins the post-migration shape of the v20 config. The plugin schema
|
// Pins the post-migration shape of the v21 config. The plugin schema
|
||||||
// gate stamps Config.Version = 20 right after load, so by the time
|
// gate stamps Config.Version = 21 right after load, so by the time
|
||||||
// /xlperf reaches this step the migration must already be complete
|
// /xlperf reaches this step the migration must already be complete
|
||||||
// and the five v20 fields must carry their declared defaults on a
|
// and the five v21 fields must carry their declared defaults on a
|
||||||
// fresh install (or the saved values on an existing one). The probe
|
// fresh install (or the saved values on an existing one). The probe
|
||||||
// only verifies the version stamp and the field types — it does not
|
// only verifies the version stamp and the field types — it does not
|
||||||
// rewrite the user's config.
|
// rewrite the user's config.
|
||||||
internal sealed class ConfigMigrationV20Step : ISelfTestStep
|
internal sealed class ConfigMigrationV21Step : ISelfTestStep
|
||||||
{
|
{
|
||||||
public ConfigMigrationV20Step(Plugin plugin)
|
public ConfigMigrationV21Step(Plugin plugin)
|
||||||
{
|
{
|
||||||
_ = plugin;
|
_ = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => "Hellion Chat - Config v20 migration";
|
public string Name => "Hellion Chat - Config v21 migration";
|
||||||
|
|
||||||
public SelfTestStepResult RunStep()
|
public SelfTestStepResult RunStep()
|
||||||
{
|
{
|
||||||
if (Plugin.Config.Version != 20)
|
if (Plugin.Config.Version != 21)
|
||||||
{
|
{
|
||||||
ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 20");
|
ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 21");
|
||||||
return SelfTestStepResult.Fail;
|
return SelfTestStepResult.Fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +54,7 @@ internal sealed class ConfigMigrationV20Step : ISelfTestStep
|
|||||||
// here is just a touch-test that the property is reachable.
|
// here is just a touch-test that the property is reachable.
|
||||||
_ = Plugin.Config.MainWindowOpen;
|
_ = Plugin.Config.MainWindowOpen;
|
||||||
_ = Plugin.Config.SettingsWindowOpen;
|
_ = Plugin.Config.SettingsWindowOpen;
|
||||||
|
_ = Plugin.Config.ScreenshotMode;
|
||||||
|
|
||||||
return SelfTestStepResult.Pass;
|
return SelfTestStepResult.Pass;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user