Fix visibility restore at WFC exit

This commit is contained in:
Bryan Ashby 2022-10-02 11:22:23 -06:00
parent 0ef3df047a
commit c7568ac897
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 4 additions and 1 deletions

View File

@ -89,6 +89,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
toggleVisible: (formData, extraArgs, cb) => { toggleVisible: (formData, extraArgs, cb) => {
const visible = this.client.user.isVisible(); const visible = this.client.user.isVisible();
this.client.user.setVisibility(!visible); this.client.user.setVisibility(!visible);
this.visibilityToggled = true; // we won't restore it in this case
return this._refreshAll(cb); return this._refreshAll(cb);
}, },
displayHelp: (formData, extraArgs, cb) => { displayHelp: (formData, extraArgs, cb) => {
@ -366,8 +367,10 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
} }
_restoreOpVisibility() { _restoreOpVisibility() {
if (!this.visibilityToggled) {
this.client.user.setVisibility(this.restoreUserIsVisible); this.client.user.setVisibility(this.restoreUserIsVisible);
} }
}
_startRefreshing() { _startRefreshing() {
if (this.mainRefreshTimer) { if (this.mainRefreshTimer) {