Checks whether we need to modify document, before change - on display name change.
This commit is contained in:
parent
4d63ea2021
commit
613569ff09
|
@ -153,12 +153,14 @@ var ContactList = {
|
|||
},
|
||||
|
||||
onDisplayNameChange (id, displayName) {
|
||||
if(!displayName)
|
||||
return;
|
||||
if (id === 'localVideoContainer') {
|
||||
id = APP.conference.localId;
|
||||
}
|
||||
let contactName = $(`#contacts #${id}>p`);
|
||||
|
||||
if (displayName) {
|
||||
if (contactName.text() !== displayName) {
|
||||
contactName.text(displayName);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -357,7 +357,9 @@ RemoteVideo.prototype.setDisplayName = function(displayName, key) {
|
|||
// If we already have a display name for this video.
|
||||
if (nameSpan.length > 0) {
|
||||
if (displayName && displayName.length > 0) {
|
||||
$('#' + this.videoSpanId + '_name').text(displayName);
|
||||
var displaynameSpan = $('#' + this.videoSpanId + '_name');
|
||||
if (displaynameSpan.text() !== displayName)
|
||||
displaynameSpan.text(displayName);
|
||||
}
|
||||
else if (key && key.length > 0) {
|
||||
var nameHtml = APP.translation.generateTranslationHTML(key);
|
||||
|
|
Loading…
Reference in New Issue