Initial support for user status flags (NotAvail, NotVisible, ...)
This commit is contained in:
21
core/wfc.js
21
core/wfc.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user