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_events: Avoid populating from outdated cached msg data.

Aman Agrawal17874e57477b
diff --git a/web/src/message_events.js b/web/src/message_events.js
index 6fe3aaffca3..f61944fa64f 100644
--- a/web/src/message_events.js
+++ b/web/src/message_events.js
@@ -628,6 +628,11 @@ export function update_messages(events) {
// with data fetched from the server (which is already updated)
// when we move to new narrow and what data is locally available.
if (changed_narrow) {
+ // Remove outdated cached data to avoid repopulating from it.
+ // We are yet to update the cached message list data for
+ // the moved topics.
+ // TODO: Update the cache instead of discarding it.
+ message_list_data_cache.remove(new_filter);
const terms = new_filter.terms();
const opts = {
trigger: "stream/topic change",