fix: properly save when closing log

This commit is contained in:
Anna 2023-08-10 15:29:51 -04:00
parent e579175d55
commit f233753e26
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,6 @@ namespace SoundFilter.Ui {
ImGui.SetNextWindowSize(new Vector2(500, 450), ImGuiCond.FirstUseEver);
if (!ImGui.Begin(Language.LogWindowTitle, ref this.Plugin.Config.ShowLog)) {
this.Plugin.Config.Save();
ImGui.End();
return;
}
@ -67,6 +66,10 @@ namespace SoundFilter.Ui {
ImGui.EndChild();
}
// god disabled this frame
if (!this.Plugin.Config.ShowLog) {
this.Plugin.Config.Save();
}
ImGui.End();
}