fix: actually save config when toggling setting
This commit is contained in:
parent
e0621f0a0f
commit
fe65226598
|
@ -20,7 +20,9 @@ internal class SettingsTab {
|
|||
|
||||
ImGuiHelpers.CenteredText("Options");
|
||||
|
||||
ImGui.Checkbox("Open window when a new question is available", ref this.Plugin.Config.OpenWhenNew);
|
||||
var anyChanged = false;
|
||||
|
||||
anyChanged |= ImGui.Checkbox("Open window when a new question is available", ref this.Plugin.Config.OpenWhenNew);
|
||||
using (ImGuiHelper.WithDisabledColour()) {
|
||||
ImGui.TextUnformatted("The window will not open until you are not busy in most cases (not in combat, not in instance, etc.).");
|
||||
}
|
||||
|
@ -31,7 +33,9 @@ internal class SettingsTab {
|
|||
ImGui.TextUnformatted("These are optional questions that will be sent with every vote you cast. They are used to display breakdowns in the details window for each question.");
|
||||
ImGui.Spacing();
|
||||
|
||||
if (this.Plugin.Ui.DrawOptionalQuestions()) {
|
||||
anyChanged |= this.Plugin.Ui.DrawOptionalQuestions();
|
||||
|
||||
if (anyChanged) {
|
||||
this.Plugin.SaveConfig();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue