Add update hook
This commit is contained in:
parent
26fbac6bbc
commit
7e2fca9059
|
@ -60,8 +60,8 @@
|
|||
{
|
||||
"id": "hide-button",
|
||||
"type": "bool",
|
||||
"text": "Hide the BetterDiscord menu button",
|
||||
"hint": "When this is enabled you can use Control/Command + B to open the BetterDiscord menu",
|
||||
"text": "Hide the BetterDiscord button",
|
||||
"hint": "When this is enabled you can use Ctrl/Cmd + B to open the BetterDiscord settings menu.",
|
||||
"value": false,
|
||||
"disabled": false
|
||||
}
|
||||
|
|
|
@ -86,8 +86,10 @@ export default class {
|
|||
|
||||
for (let setting of category.settings) {
|
||||
if (setting.id !== setting_id) continue;
|
||||
if (setting.value === value) return true;
|
||||
|
||||
setting.value = value;
|
||||
this.settingUpdated(set_id, category_id, setting_id, value);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +98,10 @@ export default class {
|
|||
return false;
|
||||
}
|
||||
|
||||
static settingUpdated(set_id, category_id, setting_id, value) {
|
||||
Logger.log('Settings', `${set_id}/${category_id}/${setting_id} was set to ${value}`);
|
||||
}
|
||||
|
||||
static get getSettings() {
|
||||
return this.settings ? this.settings : defaultSettings;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue