Do not try to rerender muted messages

(imported from commit 1430b204cd7d32ddcee273b142bcbc2d699caffb)
This commit is contained in:
Jason Michalski 2014-03-18 15:46:32 -04:00
parent e60f76487f
commit c3ded56a7e
1 changed files with 4 additions and 5 deletions

View File

@ -730,11 +730,6 @@ MessageListView.prototype = {
var row = this.get_row(message_container.msg.id);
var was_selected = this.list.selected_message() === message_container.msg;
// We may not have the row if the stream or topic was muted
if (row.length === 0) {
return;
}
// Re-render just this one message
this._add_msg_timestring(message_container);
@ -762,6 +757,10 @@ MessageListView.prototype = {
var message_containers = _.map(messages, function (message) {
return self.message_containers[message.id];
});
// We may not have the message_container if the stream or topic was muted
message_containers = _.reject(message_containers, function (message_container) {
return message_container === undefined;
});
var message_groups = [];
var current_group = [];