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) => {
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() {