-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
message view: Don't mark selected message as read when narrowing.
For narrows where we select the first unread message, on activation we have to select it. And on our initial selection was also `force_rerender` the message list which causes the message to get reselected. When `MessageList.select_id` is called for the first time, `previously_selected_id` is -1. However, because the rerender function call is before the event trigger, `select_id` is called again this time with `previously_selected_id` have the same id as the to be selected message and this selection event gets triggered before our first time's selection. This above case only occurs only for narrow activation or when a message is selected again by clicking on it (message is already read for this case). For the All Messages view we have similar logic where, since opts does not contain `force_rerender` we pass `mark_read` as false (which was previously unused) which skips the "message_selected.zulip" event in `message_scroll.js`. Fixes #10886.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters