From 942cfa711885556f59205509d31b494a3122c6cd Mon Sep 17 00:00:00 2001 From: Joseph Ho <62449508+Joelute@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:56:04 -0400 Subject: [PATCH] narrow: Explicitly resume the reading state when `narrow.deactivate`. Previously, when a user marks messages as unread in the all messages view then enters another view and finally back to the all messages view, they'd notice that the reading state in all messages view is still paused. This happened uniquely for "All messages" because we only resumed the "reading" state in `narrow.activate` (and generally that would generate a new MessageList anyway); but `message_lists.home` is a singleton, so the "no longer reading" state would remain attached to that object forever. Fix this by explicitly resuming the reading state when we enter all messages view/message_lists via narrow.deactivate. --- web/src/narrow.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/narrow.js b/web/src/narrow.js index 3698e30e9a..ff2f32ab04 100644 --- a/web/src/narrow.js +++ b/web/src/narrow.js @@ -1064,6 +1064,7 @@ export function deactivate(coming_from_recent_topics = false) { $("#zfilt").removeClass("focused_table"); $("#zhome").addClass("focused_table"); message_lists.set_current(message_lists.home); + message_lists.current.resume_reading(); condense.condense_and_collapse($("#zhome div.message_row")); reset_ui_state();