fix: properly save when closing log

This commit is contained in:
Anna 2023-08-10 15:29:51 -04:00
parent 24be9d517f
commit 82c02977c7
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
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();
}