mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
unread_ops: Add unread class to messages instead of a full rerender.
When user marks messages as unread, we used to rerender them but that was not required since we only need to add `unread` class to their `message_row` to achieve the same effect.
This commit is contained in:
@@ -1587,4 +1587,13 @@ export class MessageListView {
|
||||
}
|
||||
$row.removeClass("unread");
|
||||
}
|
||||
|
||||
show_messages_as_unread(message_ids) {
|
||||
const $table = rows.get_table(this.table_name);
|
||||
const $rows_to_show_as_unread = $table.find(".message_row").filter((index, $row) => {
|
||||
const message_id = Number.parseFloat($row.getAttribute("zid"));
|
||||
return message_ids.includes(message_id);
|
||||
});
|
||||
$rows_to_show_as_unread.addClass("unread");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user