Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
fix: Toggled options don't cause state save
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Apr 29, 2022
1 parent 7d47c23 commit c2c4f17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/userscript/source/ui/BonfireSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ export class BonfireSettingsUi extends SettingsSectionUi<BonfireSettings> {
): JQuery<HTMLElement> {
const element = this._getOption(name, option, label, delimiter, {
onCheck: () => {
option.enabled = true;
this._host.updateOptions(() => (option.enabled = true));
this._host.imessage("status.auto.enable", [label]);
},
onUnCheck: () => {
option.enabled = false;
this._host.updateOptions(() => (option.enabled = false));
this._host.imessage("status.auto.disable", [label]);
},
});
Expand Down
4 changes: 2 additions & 2 deletions packages/userscript/source/ui/SpaceSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ export class SpaceSettingsUi extends SettingsSectionUi<SpaceSettings> {
): JQuery<HTMLElement> {
const element = this._getOption(name, option, i18nName, delimiter, {
onCheck: () => {
option.enabled = true;
this._host.updateOptions(() => (option.enabled = true));
this._host.imessage("status.auto.enable", [i18nName]);
},
onUnCheck: () => {
option.enabled = false;
this._host.updateOptions(() => (option.enabled = false));
this._host.imessage("status.auto.disable", [i18nName]);
},
});
Expand Down

0 comments on commit c2c4f17

Please sign in to comment.