Pārlūkot izejas kodu

fix issue with nickname input in chat

j8
isymchych 9 gadus atpakaļ
vecāks
revīzija
fbe5ef7ee6
3 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 1
    0
      app.js
  2. 4
    0
      modules/UI/UI.js
  3. 1
    4
      modules/UI/side_pannels/chat/Chat.js

+ 1
- 0
app.js Parādīt failu

@@ -375,6 +375,7 @@ function initConference(localTracks, connection) {
375 375
     APP.UI.addListener(UIEvents.NICKNAME_CHANGED, function (nickname) {
376 376
         APP.settings.setDisplayName(nickname);
377 377
         room.setDisplayName(nickname);
378
+        APP.UI.changeDisplayName(APP.conference.localId, nickname);
378 379
     });
379 380
 
380 381
     room.on(ConferenceErrors.CONNECTION_ERROR, function () {

+ 4
- 0
modules/UI/UI.js Parādīt failu

@@ -155,6 +155,10 @@ UI.changeDisplayName = function (id, displayName) {
155 155
     ContactList.onDisplayNameChange(id, displayName);
156 156
     SettingsMenu.onDisplayNameChange(id, displayName);
157 157
     VideoLayout.onDisplayNameChanged(id, displayName);
158
+
159
+    if (APP.conference.isLocalId(id)) {
160
+        Chat.setChatConversationMode(!!displayName);
161
+    }
158 162
 };
159 163
 
160 164
 UI.initConference = function () {

+ 1
- 4
modules/UI/side_pannels/chat/Chat.js Parādīt failu

@@ -181,10 +181,7 @@ var Chat = {
181 181
                 event.preventDefault();
182 182
                 var val = UIUtil.escapeHtml(this.value);
183 183
                 this.value = '';
184
-                if (APP.settings.getDisplayName()) {
185
-                    eventEmitter.emit(UIEvents.NICKNAME_CHANGED, val);
186
-                    return;
187
-                }
184
+                eventEmitter.emit(UIEvents.NICKNAME_CHANGED, val);
188 185
             }
189 186
         });
190 187
 

Notiek ielāde…
Atcelt
Saglabāt