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

Commit

Permalink
fix(ui): Duplicate trigger prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Oct 8, 2022
1 parent 0842cf5 commit ef2b42a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/userscript/source/ui/SettingsSectionUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,7 @@ export abstract class SettingsSectionUiBase {
* @returns The created button.
*/
protected _makeSectionTriggerButton(id: string, itext: string, setting: SettingTrigger) {
return SettingTriggerUi.getTriggerButton(this._host, id, itext, setting, {
onClick: () => {
const value = SettingsSectionUi.promptPercentage(
this._host.engine.i18n("ui.trigger.set", [itext]),
SettingsSectionUi.renderPercentage(setting.trigger)
);

if (value !== null) {
this._host.updateOptions(() => (setting.trigger = value));
this.refreshUi();
}
},
});
return SettingTriggerUi.getTriggerButton(this._host, id, itext, setting);
}

static getList(id: string) {
Expand Down

0 comments on commit ef2b42a

Please sign in to comment.