From c2f1c6980f5ef50d4d147e1dd399e457c70b6061 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 21 Dec 2020 23:28:23 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20popup=20interface=20not=20updating=20?= =?UTF-8?q?=E2=80=94=20#127?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/popup/App.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/popup/App.vue b/src/popup/App.vue index 150fc00..5a67bbd 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -245,7 +245,7 @@ export default { 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(); this.settingsInitialized = true; @@ -339,7 +339,14 @@ export default { async updateConfig() { // when this runs, a site could have been enabled or disabled // this means we must update canShowVideoTab + const settings = this.settings; + this.settings = null; this.updateCanShowVideoTab(); + + this.$nextTick(() => { + this.settings = settings; + this.updateCanShowVideoTab(); + }); }, updateCanShowVideoTab() { let canShow = false;