Просмотр исходного кода

Merge pull request #946 from jitsi/fix-moderator-notifications

Fixes moderator notifications on moderator indicator disabled
j8
Paweł Domas 9 лет назад
Родитель
Сommit
b4a191e27a
3 измененных файлов: 13 добавлений и 5 удалений
  1. 4
    2
      conference.js
  2. 6
    2
      modules/UI/UI.js
  3. 3
    1
      modules/UI/videolayout/SmallVideo.js

+ 4
- 2
conference.js Просмотреть файл

@@ -1153,8 +1153,10 @@ export default {
1153 1153
         room.on(ConferenceEvents.USER_ROLE_CHANGED, (id, role) => {
1154 1154
             if (this.isLocalId(id)) {
1155 1155
                 console.info(`My role changed, new role: ${role}`);
1156
-                this.isModerator = room.isModerator();
1157
-                APP.UI.updateLocalRole(room.isModerator());
1156
+                if (this.isModerator !== room.isModerator()) {
1157
+                    this.isModerator = room.isModerator();
1158
+                    APP.UI.updateLocalRole(room.isModerator());
1159
+                }
1158 1160
             } else {
1159 1161
                 let user = room.getParticipantById(id);
1160 1162
                 if (user) {

+ 6
- 2
modules/UI/UI.js Просмотреть файл

@@ -689,7 +689,9 @@ UI.updateLocalRole = function (isModerator) {
689 689
     SettingsMenu.showFollowMeOptions(isModerator);
690 690
 
691 691
     if (isModerator) {
692
-        messageHandler.notify(null, "notify.me", 'connected', "notify.moderator");
692
+        if (!interfaceConfig.DISABLE_FOCUS_INDICATOR)
693
+            messageHandler
694
+                .notify(null, "notify.me", 'connected', "notify.moderator");
693 695
 
694 696
         Recording.checkAutoRecord();
695 697
     }
@@ -703,7 +705,9 @@ UI.updateLocalRole = function (isModerator) {
703 705
 UI.updateUserRole = function (user) {
704 706
     VideoLayout.showModeratorIndicator();
705 707
 
706
-    if (!user.isModerator()) {
708
+    // We don't need to show moderator notifications when the focus (moderator)
709
+    // indicator is disabled.
710
+    if (!user.isModerator() || interfaceConfig.DISABLE_FOCUS_INDICATOR) {
707 711
         return;
708 712
     }
709 713
 

+ 3
- 1
modules/UI/videolayout/SmallVideo.js Просмотреть файл

@@ -312,7 +312,9 @@ SmallVideo.prototype.getVideoMutedIndicator = function () {
312 312
  */
313 313
 SmallVideo.prototype.createModeratorIndicatorElement = function () {
314 314
     // don't create moderator indicator if DISABLE_FOCUS_INDICATOR is true
315
-    if (interfaceConfig.DISABLE_FOCUS_INDICATOR) return false;
315
+    if (interfaceConfig.DISABLE_FOCUS_INDICATOR)
316
+        return false;
317
+
316 318
     // Show moderator indicator
317 319
     var indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
318 320
 

Загрузка…
Отмена
Сохранить