Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message lists: Don't allow user/topic mute message filtering independently.
Abhijeet Prasad Bodase64e5936cedf
diff --git a/frontend_tests/node_tests/message_list_data.js b/frontend_tests/node_tests/message_list_data.jsindex 656f9d0457a..200ea2f1919 100644--- a/frontend_tests/node_tests/message_list_data.js+++ b/frontend_tests/node_tests/message_list_data.js@@ -73,7 +73,7 @@ run_test("basics", () => {mld.remove([50]);assert_contents(mld, [10, 15, 20, 25, 30, 35, 40, 45, 60, 70]);- mld.update_items_for_topic_muting();+ mld.update_items_for_muting();assert_contents(mld, [10, 15, 20, 25, 30, 35, 40, 45, 60, 70]);mld.reset_select_to_closest();diff --git a/static/js/message_events.js b/static/js/message_events.jsindex 226f31e205d..93430c74b2e 100644--- a/static/js/message_events.js+++ b/static/js/message_events.js@@ -411,18 +411,18 @@ export function update_messages(events) {// propagated edits to be updated (since the topic edits can have// changed the correct grouping of messages).if (topic_edited || stream_changed) {- message_lists.home.update_topic_muting_and_rerender();+ message_lists.home.update_muting_and_rerender();// However, we don't need to rerender message_list.narrowed if// we just changed the narrow earlier in this function.//// TODO: We can potentially optimize this logic to avoid- // calling `update_topic_muting_and_rerender` if the muted+ // calling `update_muting_and_rerender` if the muted// messages would not match the view before or after this// edit. Doing so could save significant work, since most// topic edits will not match the current topic narrow in// large organizations.if (!changed_narrow && message_lists.current === message_list.narrowed) {- message_list.narrowed.update_topic_muting_and_rerender();+ message_list.narrowed.update_muting_and_rerender();}} else {// If the content of the message was edited, we do a special animation.diff --git a/static/js/message_list.js b/static/js/message_list.jsindex 825b628c5e2..594729ed56b 100644--- a/static/js/message_list.js+++ b/static/js/message_list.js@@ -383,8 +383,8 @@ export class MessageList {}}- update_topic_muting_and_rerender() {- this.data.update_items_for_topic_muting();+ update_muting_and_rerender() {+ this.data.update_items_for_muting();// We need to rerender whether or not the narrow hides muted// topics, because we need to update recipient bars for topics// we've muted when we are displaying those topics.diff --git a/static/js/message_list_data.js b/static/js/message_list_data.jsindex e490e7f1e1c..58fce13be4b 100644--- a/static/js/message_list_data.js+++ b/static/js/message_list_data.js@@ -186,7 +186,7 @@ export class MessageListData {return this.messages_filtered_for_topic_mutes(messages);}- update_items_for_topic_muting() {+ update_items_for_muting() {if (!this.excludes_muted_topics) {return;}diff --git a/static/js/muting_ui.js b/static/js/muting_ui.jsindex d68462e9e7f..5edc156a0b2 100644--- a/static/js/muting_ui.js+++ b/static/js/muting_ui.js@@ -25,9 +25,9 @@ import * as unread_ui from "./unread_ui";export function rerender_for_muted_topic(old_muted_topics) {stream_list.update_streams_sidebar();- message_lists.current.update_topic_muting_and_rerender();+ message_lists.current.update_muting_and_rerender();if (message_lists.current !== message_lists.home) {- message_lists.home.update_topic_muting_and_rerender();+ message_lists.home.update_muting_and_rerender();}if (overlays.settings_open() && settings_muted_topics.loaded) {settings_muted_topics.populate_list();