mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
message_list_view: Don't mark message as read after re-render.
When selecting a previously selected message after a re-render, we don't need to mark it as read. This caused a bug where user cannot mark the selected message in a narrow as unread. Also, added an additional check to only select messages if the message is re-rendered in the currently visible message list since you cannot select a message in a view which is not visible.
This commit is contained in:
@@ -1250,8 +1250,9 @@ export class MessageListView {
|
||||
this._post_process($rendered_msg);
|
||||
$row.replaceWith($rendered_msg);
|
||||
|
||||
if (was_selected) {
|
||||
this.list.select_id(message_container.msg.id);
|
||||
// If this list not currently displayed, we don't need to select the message.
|
||||
if (was_selected && this.list === message_lists.current) {
|
||||
this.list.reselect_selected_id(message_container.msg.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user