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.

narrow: Don't try to save the recent_topics pre_narrow_offset.

YashRE420d117ab0334e
diff --git a/static/js/narrow.js b/static/js/narrow.js
index 5624f813de7..aea5c3ab941 100644
--- a/static/js/narrow.js
+++ b/static/js/narrow.js
@@ -224,6 +224,12 @@ export function activate(raw_operators, opts) {
if (recent_topics_util.is_visible()) {
recent_topics_ui.hide();
+ } else {
+ // If recent topics was not visible, then we are switching
+ // from another message list view. Save the scroll position in
+ // that message list, so that we can restore it if/when we
+ // later navigate back to that view.
+ save_pre_narrow_offset_for_reload();
}
const was_narrowed_already = narrow_state.active();
@@ -298,9 +304,6 @@ export function activate(raw_operators, opts) {
const excludes_muted_topics = narrow_state.excludes_muted_topics();
- // Save how far from the pointer the top of the message list was.
- save_pre_narrow_offset_for_reload();
-
let msg_data = new MessageListData({
filter: narrow_state.filter(),
excludes_muted_topics,