Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions js/views/emptycontentview.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,17 @@

this.setEmptyContentMessageWhenWaitingForOthersToJoinTheCall();

// The 'leaveCurrentRoom' is triggered before the 'destroy' event,
// so when the room is destroyed the initial message overwrites the
// conversation ended message.
this.listenTo(this._activeRoom, 'destroy', this.setInitialEmptyContentMessage);
this.listenTo(this._activeRoom, 'destroy', function() {
this.stopListening(this._activeRoom, 'destroy', this.setInitialEmptyContentMessage);
this._disableUpdatesOnActiveRoomChanges();

this._activeRoom = null;

// 'leaveCurrentRoom' is sometimes triggered before the
// 'destroy' event, so when the room is destroyed the initial
// message overwrites the conversation ended message.
this.setInitialEmptyContentMessage();
});
this._enableUpdatesOnActiveRoomChanges();
},

Expand Down Expand Up @@ -240,6 +247,13 @@
},

setEmptyContentMessageWhenConversationEnded: function() {
// 'leaveCurrentRoom' is sometimes triggered after the 'destroy'
// event, so do not overwrite the initial message with the
// conversation ended message.
if (!this._activeRoom) {
return;
}

this.setEmptyContentMessage(
'icon-video-off',
t('spreed', 'This conversation has ended')
Expand Down