fix(settings): remove the switches that do nothing
Six settings had a control, a saved value, translated labels, and no reader anywhere in the plugin. Flipping them changed a byte on disk and nothing else. Three sat next to each other in the Chat tab under timestamps, so the section read as four related options where only one -- the 24-hour clock -- works. FormatTimestamp consults nothing else. The first-run wizard offered one of them too, on its visual step, and listed it back in the summary as if it had been applied. That is the first screen a new user sees, so it goes as well. Their own strings show how long this has been drifting: the wizard called PrettierTimestamps "relative time", the settings tab called the same field "modern layout". Two different features, one boolean, neither implemented. That is also why these are removed rather than wired up -- there is no single behaviour to restore, and inventing one belongs in a cycle that plans it. Config fields stay, with a comment. A stored value should survive until the rendering it describes exists, and dropping them would silently reset anyone who set them. Found by an audit that turned up considerably more of this: 433 of 824 translated resource keys reach no code at all, and the export, cleanup, tab editor and pin paths are complete but unreachable. That is its own cycle; this commit only clears what actively lies to the user in the window we are working on.
This commit is contained in:
@@ -181,9 +181,16 @@ public class Configuration : IPluginConfiguration
|
||||
public bool ShowHideButton = true;
|
||||
public bool NativeItemTooltips = true;
|
||||
public bool ScreenshotMode;
|
||||
|
||||
// No control and no reader. Kept so a stored value survives until the
|
||||
// rendering they describe exists; see the reconnect backlog. Note the two
|
||||
// resource sets disagree on what PrettierTimestamps even means -- the wizard
|
||||
// called it "relative time", the settings tab "modern layout".
|
||||
public bool PrettierTimestamps = true;
|
||||
public bool MoreCompactPretty;
|
||||
public bool HideSameTimestamps = true;
|
||||
|
||||
// No reader; see the reconnect backlog.
|
||||
public bool ShowNoviceNetwork;
|
||||
|
||||
// Migration-only since v23: the 1.5.6 sidebar↔top-tabs switch, superseded by
|
||||
@@ -191,6 +198,8 @@ public class Configuration : IPluginConfiguration
|
||||
// the v23 migration in Plugin.cs and kept deserializable so a 1.5.6 user's
|
||||
// false value survives one load. Remove in a later schema bump.
|
||||
public bool SidebarTabView = true;
|
||||
|
||||
// No reader; see the reconnect backlog.
|
||||
public bool PrintChangelog = true;
|
||||
public bool OnlyPreviewIf;
|
||||
public int PreviewMinimum = 1;
|
||||
@@ -260,6 +269,7 @@ public class Configuration : IPluginConfiguration
|
||||
return defaults;
|
||||
}
|
||||
|
||||
// No reader; see the reconnect backlog.
|
||||
public bool ColorSelectedInputChannelButton = true;
|
||||
public List<Tab> Tabs = [];
|
||||
|
||||
|
||||
@@ -41,18 +41,6 @@ internal sealed class ChatColourPicker
|
||||
ImGui.Separator();
|
||||
ImGui.Spacing();
|
||||
|
||||
if (
|
||||
ImGui.Checkbox(
|
||||
Language.Options_ColorSelectedInputChannelButton_Name,
|
||||
ref Plugin.Config.ColorSelectedInputChannelButton
|
||||
)
|
||||
)
|
||||
{
|
||||
_plugin.SaveConfig();
|
||||
}
|
||||
ImGuiUtil.HelpMarker(Language.Options_ColorSelectedInputChannelButton_Description);
|
||||
ImGui.Spacing();
|
||||
|
||||
// Discrete clicks (reset/import) persist at once. The ColorEdit3 drag only
|
||||
// recolours live (Refresh, no disk write) and defers SaveConfig to release
|
||||
// via IsItemDeactivatedAfterEdit, so dragging the colour wheel doesn't fire
|
||||
|
||||
@@ -24,21 +24,6 @@ internal sealed class ChatTab
|
||||
() => Plugin.Config.UseCompactDensity,
|
||||
v => Plugin.Config.UseCompactDensity = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"More compact pretty mode",
|
||||
() => Plugin.Config.MoreCompactPretty,
|
||||
v => Plugin.Config.MoreCompactPretty = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"Prettier timestamps",
|
||||
() => Plugin.Config.PrettierTimestamps,
|
||||
v => Plugin.Config.PrettierTimestamps = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"Hide same timestamps",
|
||||
() => Plugin.Config.HideSameTimestamps,
|
||||
v => Plugin.Config.HideSameTimestamps = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"24-hour clock",
|
||||
() => Plugin.Config.Use24HourClock,
|
||||
|
||||
@@ -40,16 +40,6 @@ internal sealed class GeneralTab
|
||||
() => Plugin.Config.ReduceMotion,
|
||||
v => Plugin.Config.ReduceMotion = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"Print changelog on update",
|
||||
() => Plugin.Config.PrintChangelog,
|
||||
v => Plugin.Config.PrintChangelog = v
|
||||
);
|
||||
_w.Toggle(
|
||||
"Show novice network",
|
||||
() => Plugin.Config.ShowNoviceNetwork,
|
||||
v => Plugin.Config.ShowNoviceNetwork = v
|
||||
);
|
||||
DrawLanguagePicker();
|
||||
}
|
||||
|
||||
|
||||
@@ -414,10 +414,6 @@ public sealed class FirstRunWizard : Window
|
||||
if (ImGui.Checkbox(HellionStrings.Wizard_Step3_UseCompactDensity_Label, ref compact))
|
||||
_state.PendingUseCompactDensity = compact;
|
||||
|
||||
var pretty = _state.PendingPrettierTimestamps ?? Plugin.Config.PrettierTimestamps;
|
||||
if (ImGui.Checkbox(HellionStrings.Wizard_Step3_PrettierTimestamps_Label, ref pretty))
|
||||
_state.PendingPrettierTimestamps = pretty;
|
||||
|
||||
// Theme dropdown — built-ins only. Custom themes are power-user
|
||||
// territory and would clutter the first-run flow.
|
||||
var currentSlug = _state.PendingTheme ?? Plugin.Config.Theme;
|
||||
@@ -513,14 +509,11 @@ public sealed class FirstRunWizard : Window
|
||||
);
|
||||
|
||||
var compact = _state.PendingUseCompactDensity ?? Plugin.Config.UseCompactDensity;
|
||||
var pretty = _state.PendingPrettierTimestamps ?? Plugin.Config.PrettierTimestamps;
|
||||
var themeSlug = _state.PendingTheme ?? Plugin.Config.Theme;
|
||||
var themeName = Plugin.ThemeRegistry.Get(themeSlug).Name;
|
||||
var visualParts = new List<string>();
|
||||
if (compact)
|
||||
visualParts.Add(HellionStrings.Wizard_Step3_UseCompactDensity_Label);
|
||||
if (pretty)
|
||||
visualParts.Add(HellionStrings.Wizard_Step3_PrettierTimestamps_Label);
|
||||
visualParts.Add(themeName);
|
||||
ImGui.TextWrapped(
|
||||
string.Format(
|
||||
@@ -594,9 +587,6 @@ public sealed class FirstRunWizard : Window
|
||||
if (_state.PendingUseCompactDensity.HasValue)
|
||||
Plugin.Config.UseCompactDensity = _state.PendingUseCompactDensity.Value;
|
||||
|
||||
if (_state.PendingPrettierTimestamps.HasValue)
|
||||
Plugin.Config.PrettierTimestamps = _state.PendingPrettierTimestamps.Value;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(_state.PendingTheme))
|
||||
{
|
||||
Plugin.Config.Theme = _state.PendingTheme;
|
||||
@@ -687,7 +677,6 @@ public sealed class FirstRunWizard : Window
|
||||
public bool? PendingFilterIncludePreviousSessions { get; set; }
|
||||
public int? PendingAutoTellTabsHistoryPreload { get; set; }
|
||||
public bool? PendingUseCompactDensity { get; set; }
|
||||
public bool? PendingPrettierTimestamps { get; set; }
|
||||
public string? PendingTheme { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user