From c7568ac897a0d8b2fa075ada915168417880d1e4 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 2 Oct 2022 11:22:23 -0600 Subject: [PATCH] Fix visibility restore at WFC exit --- core/wfc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/wfc.js b/core/wfc.js index 5933a356..749593ab 100644 --- a/core/wfc.js +++ b/core/wfc.js @@ -89,6 +89,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule { toggleVisible: (formData, extraArgs, cb) => { const visible = this.client.user.isVisible(); this.client.user.setVisibility(!visible); + this.visibilityToggled = true; // we won't restore it in this case return this._refreshAll(cb); }, displayHelp: (formData, extraArgs, cb) => { @@ -366,7 +367,9 @@ exports.getModule = class WaitingForCallerModule extends MenuModule { } _restoreOpVisibility() { - this.client.user.setVisibility(this.restoreUserIsVisible); + if (!this.visibilityToggled) { + this.client.user.setVisibility(this.restoreUserIsVisible); + } } _startRefreshing() {