Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_view: Fix jump to first unread button not working.

Aman Agrawale65e97a2930b
diff --git a/web/src/message_view.ts b/web/src/message_view.ts
index 61817d15ea8..034e3fc068c 100644
--- a/web/src/message_view.ts
+++ b/web/src/message_view.ts
@@ -851,10 +851,11 @@ export let show = (raw_terms: NarrowTerm[], show_opts: ShowMessageViewOpts): voi
trigger: "old_unreads_missing",
};
show(terms, opts);
+ const new_message_list_id = message_lists.current?.id;
const on_jump_to_first_unread = (): void => {
// This is a no-op if the user has already switched narrow.
- if (msg_list.id !== message_lists.current?.id) {
+ if (new_message_list_id !== message_lists.current?.id) {
return;
}