Initial support for user status flags (NotAvail, NotVisible, ...)

This commit is contained in:
Bryan Ashby
2022-05-08 22:15:57 -06:00
parent 24491000ad
commit 6502f3b55e
5 changed files with 62 additions and 14 deletions

View File

@@ -96,6 +96,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
enter() {
this.client.stopIdleMonitor();
this._applyOpVisibility();
super.enter();
}
@@ -104,12 +105,30 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
return stream.name === 'wfc-ringbuffer';
});
this._restoreOpVisibility();
this._stopRefreshing();
this.client.startIdleMonitor();
super.leave();
}
_applyOpVisibility() {
const vis = this.config.opVisibility || 'current';
this.restoreUserIsVisible = this.client.user.isVisible();
switch (vis) {
case 'hidden' : this.client.user.setVisibility(false); break;
case 'visible' : this.client.user.setVisibility(true); break;
default : break;
}
}
_restoreOpVisibility() {
this.client.user.setVisibility(this.restoreUserIsVisible);
}
_startRefreshing() {
this.mainRefreshTimer = setInterval( () => {
this._refreshAll();
@@ -214,7 +233,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
return cb(null);
}
const nodeStatusItems = getActiveConnectionList(false)
const nodeStatusItems = getActiveConnectionList({authUsersOnly: false, visibleOnly: false})
.slice(0, nodeStatusView.dimens.height)
.map(ac => {
// Handle pre-authenticated