fix issue with nickname input in chat
This commit is contained in:
parent
e666ed70f7
commit
fbe5ef7ee6
1
app.js
1
app.js
|
@ -375,6 +375,7 @@ function initConference(localTracks, connection) {
|
|||
APP.UI.addListener(UIEvents.NICKNAME_CHANGED, function (nickname) {
|
||||
APP.settings.setDisplayName(nickname);
|
||||
room.setDisplayName(nickname);
|
||||
APP.UI.changeDisplayName(APP.conference.localId, nickname);
|
||||
});
|
||||
|
||||
room.on(ConferenceErrors.CONNECTION_ERROR, function () {
|
||||
|
|
|
@ -155,6 +155,10 @@ UI.changeDisplayName = function (id, displayName) {
|
|||
ContactList.onDisplayNameChange(id, displayName);
|
||||
SettingsMenu.onDisplayNameChange(id, displayName);
|
||||
VideoLayout.onDisplayNameChanged(id, displayName);
|
||||
|
||||
if (APP.conference.isLocalId(id)) {
|
||||
Chat.setChatConversationMode(!!displayName);
|
||||
}
|
||||
};
|
||||
|
||||
UI.initConference = function () {
|
||||
|
|
|
@ -181,10 +181,7 @@ var Chat = {
|
|||
event.preventDefault();
|
||||
var val = UIUtil.escapeHtml(this.value);
|
||||
this.value = '';
|
||||
if (APP.settings.getDisplayName()) {
|
||||
eventEmitter.emit(UIEvents.NICKNAME_CHANGED, val);
|
||||
return;
|
||||
}
|
||||
eventEmitter.emit(UIEvents.NICKNAME_CHANGED, val);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue