Fix options not being propagated fully after being updated (#1025)
This commit is contained in:
parent
3edc35691b
commit
d62d353958
@ -105,9 +105,8 @@ class Popup extends EventDispatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setOptionsContext(optionsContext) {
|
async setOptionsContext(optionsContext) {
|
||||||
this._optionsContext = optionsContext;
|
await this._setOptionsContext(optionsContext);
|
||||||
this._options = await api.optionsGet(optionsContext);
|
await this._invokeSafe('setOptionsContext', {optionsContext});
|
||||||
this.updateTheme();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hide(changeFocus) {
|
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) {
|
async _setOptionsContextIfDifferent(optionsContext) {
|
||||||
if (deepEqual(this._optionsContext, optionsContext)) { return; }
|
if (deepEqual(this._optionsContext, optionsContext)) { return; }
|
||||||
await this.setOptionsContext(optionsContext);
|
await this._setOptionsContext(optionsContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user