summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-13 19:51:51 -0500
committerGitHub <noreply@github.com>2020-11-13 19:51:51 -0500
commitd62d353958c213c5c073973a062fbb2e3770f024 (patch)
treedd4e8284918522ef7e3649226db2c38efc7b5d4c /ext/fg/js
parent3edc35691b7e20548bfcbbefd42f4ec8991f89f7 (diff)
Fix options not being propagated fully after being updated (#1025)
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/popup.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index df177289..826457c1 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -105,9 +105,8 @@ class Popup extends EventDispatcher {
}
async setOptionsContext(optionsContext) {
- this._optionsContext = optionsContext;
- this._options = await api.optionsGet(optionsContext);
- this.updateTheme();
+ await this._setOptionsContext(optionsContext);
+ await this._invokeSafe('setOptionsContext', {optionsContext});
}
hide(changeFocus) {
@@ -655,8 +654,14 @@ class Popup extends EventDispatcher {
};
}
+ async _setOptionsContext(optionsContext) {
+ this._optionsContext = optionsContext;
+ this._options = await api.optionsGet(optionsContext);
+ this.updateTheme();
+ }
+
async _setOptionsContextIfDifferent(optionsContext) {
if (deepEqual(this._optionsContext, optionsContext)) { return; }
- await this.setOptionsContext(optionsContext);
+ await this._setOptionsContext(optionsContext);
}
}