Add hack to work around mystery settings bug

This commit is contained in:
David Baker 2019-11-20 15:34:32 +00:00
parent 71f5c8b2b0
commit a744415221
2 changed files with 9 additions and 4 deletions

View file

@ -60,13 +60,15 @@ export class ThemeWatcher {
_onAction = (payload) => {
if (payload.action === 'recheck_theme') {
this.recheck();
// XXX forceTheme
this.recheck(payload.forceTheme);
}
}
recheck() {
// XXX: forceTheme param aded here as local echo appears to be unreliable
recheck(forceTheme) {
const oldTheme = this._currentTheme;
this._currentTheme = this.getEffectiveTheme();
this._currentTheme = forceTheme === undefined ? this.getEffectiveTheme() : forceTheme;
if (oldTheme !== this._currentTheme) {
setTheme(this._currentTheme);
}