From f10177a3526cdf917ab1eb5f0aa7b37693bf8c45 Mon Sep 17 00:00:00 2001 From: yanas Date: Tue, 27 Sep 2016 14:32:54 -0500 Subject: [PATCH 1/2] Fixes moderator notifications on moderator indicator disabled --- modules/UI/UI.js | 8 ++++++-- modules/UI/videolayout/SmallVideo.js | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index eae77ddb8..0a208ffaa 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -675,7 +675,9 @@ UI.updateLocalRole = function (isModerator) { SettingsMenu.showFollowMeOptions(isModerator); if (isModerator) { - messageHandler.notify(null, "notify.me", 'connected', "notify.moderator"); + if (!interfaceConfig.DISABLE_FOCUS_INDICATOR) + messageHandler + .notify(null, "notify.me", 'connected', "notify.moderator"); Recording.checkAutoRecord(); } @@ -689,7 +691,9 @@ UI.updateLocalRole = function (isModerator) { UI.updateUserRole = function (user) { VideoLayout.showModeratorIndicator(); - if (!user.isModerator()) { + // We don't need to show moderator notifications when the focus (moderator) + // indicator is disabled. + if (!user.isModerator() || interfaceConfig.DISABLE_FOCUS_INDICATOR) { return; } diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js index 7b7192fae..64e59c087 100644 --- a/modules/UI/videolayout/SmallVideo.js +++ b/modules/UI/videolayout/SmallVideo.js @@ -291,7 +291,9 @@ SmallVideo.prototype.getVideoMutedIndicator = function () { */ SmallVideo.prototype.createModeratorIndicatorElement = function () { // don't create moderator indicator if DISABLE_FOCUS_INDICATOR is true - if (interfaceConfig.DISABLE_FOCUS_INDICATOR) return false; + if (interfaceConfig.DISABLE_FOCUS_INDICATOR) + return false; + // Show moderator indicator var indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator'); From dad3c57fad55a2893b60083b045f5134c7574ae8 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 28 Sep 2016 13:41:02 -0500 Subject: [PATCH 2/2] fix(conference): react to local role change only when it changes We initialise the UI for isModerator = false on startup, so we should not react to the event unless it gets out of sync. --- conference.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conference.js b/conference.js index ed346eca2..ba3154a60 100644 --- a/conference.js +++ b/conference.js @@ -1101,8 +1101,10 @@ export default { room.on(ConferenceEvents.USER_ROLE_CHANGED, (id, role) => { if (this.isLocalId(id)) { console.info(`My role changed, new role: ${role}`); - this.isModerator = room.isModerator(); - APP.UI.updateLocalRole(room.isModerator()); + if (this.isModerator !== room.isModerator()) { + this.isModerator = room.isModerator(); + APP.UI.updateLocalRole(room.isModerator()); + } } else { let user = room.getParticipantById(id); if (user) {