Fix popup interface not updating — #127

This commit is contained in:
Tamius Han 2020-12-21 23:28:23 +01:00
parent c0c454f3ef
commit c2f1c6980f

View File

@ -245,7 +245,7 @@ export default {
allowLogging: true, allowLogging: true,
}); });
this.settings = new Settings({updateCallback: () => this.updateConfig(), logger: this.logger}); this.settings = new Settings({afterSettingsSaved: () => this.updateConfig(), logger: this.logger});
await this.settings.init(); await this.settings.init();
this.settingsInitialized = true; this.settingsInitialized = true;
@ -339,7 +339,14 @@ export default {
async updateConfig() { async updateConfig() {
// when this runs, a site could have been enabled or disabled // when this runs, a site could have been enabled or disabled
// this means we must update canShowVideoTab // this means we must update canShowVideoTab
const settings = this.settings;
this.settings = null;
this.updateCanShowVideoTab(); this.updateCanShowVideoTab();
this.$nextTick(() => {
this.settings = settings;
this.updateCanShowVideoTab();
});
}, },
updateCanShowVideoTab() { updateCanShowVideoTab() {
let canShow = false; let canShow = false;