From 68a0293867423898181b0452d842a818ce77824a Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 15 Dec 2019 22:21:01 -0500 Subject: [PATCH] Make PopupProxy functions async enabled status match Popup --- ext/fg/js/popup-proxy.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js index e4081e90..0e6a88a7 100644 --- a/ext/fg/js/popup-proxy.js +++ b/ext/fg/js/popup-proxy.js @@ -53,11 +53,11 @@ class PopupProxy { return await this._invokeHostApi('setOptions', {id, options}); } - async hide(changeFocus) { + hide(changeFocus) { if (this._id === null) { return; } - return await this._invokeHostApi('hide', {id: this._id, changeFocus}); + this._invokeHostApi('hide', {id: this._id, changeFocus}); } async isVisible() { @@ -65,9 +65,11 @@ class PopupProxy { return await this._invokeHostApi('isVisible', {id}); } - async setVisibleOverride(visible) { - const id = await this._getPopupId(); - return await this._invokeHostApi('setVisibleOverride', {id, visible}); + setVisibleOverride(visible) { + if (this._id === null) { + return; + } + this._invokeHostApi('setVisibleOverride', {id, visible}); } async containsPoint(x, y) { @@ -88,11 +90,11 @@ class PopupProxy { return await this._invokeHostApi('setCustomCss', {id, css}); } - async clearAutoPlayTimer() { + clearAutoPlayTimer() { if (this._id === null) { return; } - return await this._invokeHostApi('clearAutoPlayTimer', {id: this._id}); + this._invokeHostApi('clearAutoPlayTimer', {id: this._id}); } // Private