From 0f9858a3d36bc79b3a5afbca571f6f9d38fab508 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Thu, 20 Aug 2026 07:54:38 +0200 Subject: [PATCH] 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. --- HellionChat/PayloadHandler.cs | 5 ++++- HellionChat/Ui/Components/InputBar.cs | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HellionChat/PayloadHandler.cs b/HellionChat/PayloadHandler.cs index 91aeb5e..a71b074 100644 --- a/HellionChat/PayloadHandler.cs +++ b/HellionChat/PayloadHandler.cs @@ -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; diff --git a/HellionChat/Ui/Components/InputBar.cs b/HellionChat/Ui/Components/InputBar.cs index ebf00a1..3938af8 100644 --- a/HellionChat/Ui/Components/InputBar.cs +++ b/HellionChat/Ui/Components/InputBar.cs @@ -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 (