fix(screenshot-mode): the toggle never wrote its change to disk

Screenshot mode is a persisted setting, but neither of the two toggles
saved the config. Turning it on only stuck when some unrelated save
happened to run afterwards -- and once it was stored, turning it off never
reached the file at all, so it came back on with every plugin load.

Both toggles save now. An install currently stuck on it needs one click.
This commit is contained in:
2026-08-20 07:54:38 +02:00
parent a3379818eb
commit 0f9858a3d3
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -194,7 +194,10 @@ internal sealed class PayloadHandler
return;
}
ImGui.Checkbox(Language.Context_ScreenshotMode, ref Plugin.Config.ScreenshotMode);
// The flag is persisted, so every toggle has to write it. Without the
// write it only sticks when some unrelated save happens to run after.
if (ImGui.Checkbox(Language.Context_ScreenshotMode, ref Plugin.Config.ScreenshotMode))
Plugin.Instance.SaveConfig();
if (ImGui.Selectable(Language.Context_HideChat))
Plugin.Config.HideChat = true;
+3
View File
@@ -901,7 +901,10 @@ internal sealed class InputBar
)
)
{
// Persisted flag -- write it here too, or turning it back off
// never reaches the config file.
Plugin.Config.ScreenshotMode = !Plugin.Config.ScreenshotMode;
Plugin.Instance.SaveConfig();
}
if (