Quellcode durchsuchen

Checks whether we need to modify document, before change - on display name change.

master
damencho vor 9 Jahren
Ursprung
Commit
613569ff09

+ 3
- 1
modules/UI/side_pannels/contactlist/ContactList.js Datei anzeigen

153
     },
153
     },
154
 
154
 
155
     onDisplayNameChange (id, displayName) {
155
     onDisplayNameChange (id, displayName) {
156
+        if(!displayName)
157
+            return;
156
         if (id === 'localVideoContainer') {
158
         if (id === 'localVideoContainer') {
157
             id = APP.conference.localId;
159
             id = APP.conference.localId;
158
         }
160
         }
159
         let contactName = $(`#contacts #${id}>p`);
161
         let contactName = $(`#contacts #${id}>p`);
160
 
162
 
161
-        if (displayName) {
163
+        if (contactName.text() !== displayName) {
162
             contactName.text(displayName);
164
             contactName.text(displayName);
163
         }
165
         }
164
     },
166
     },

+ 3
- 1
modules/UI/videolayout/RemoteVideo.js Datei anzeigen

357
     // If we already have a display name for this video.
357
     // If we already have a display name for this video.
358
     if (nameSpan.length > 0) {
358
     if (nameSpan.length > 0) {
359
         if (displayName && displayName.length > 0) {
359
         if (displayName && displayName.length > 0) {
360
-            $('#' + this.videoSpanId + '_name').text(displayName);
360
+            var displaynameSpan = $('#' + this.videoSpanId + '_name');
361
+            if (displaynameSpan.text() !== displayName)
362
+                displaynameSpan.text(displayName);
361
         }
363
         }
362
         else if (key && key.length > 0) {
364
         else if (key && key.length > 0) {
363
             var nameHtml = APP.translation.generateTranslationHTML(key);
365
             var nameHtml = APP.translation.generateTranslationHTML(key);

Laden…
Abbrechen
Speichern