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.

stream_muting: Refactor to not use message_lists.home.

Aman Agrawalfa8b7d898b5e
diff --git a/web/src/stream_muting.js b/web/src/stream_muting.js
index e31de7d6213..8821e5e12c0 100644
--- a/web/src/stream_muting.js
+++ b/web/src/stream_muting.js
@@ -7,10 +7,14 @@ import * as unread_ui from "./unread_ui";
export function update_is_muted(sub, value) {
sub.is_muted = value;
- // TODO: In theory, other message lists whose behavior depends on
- // stream muting might need to be live-updated as well, but the
- // current _all_items design doesn't have a way to support that.
- message_lists.home.update_muting_and_rerender();
+ for (const msg_list of message_lists.all_rendered_message_lists()) {
+ // TODO: In theory, other message lists whose behavior depends on
+ // stream muting might need to be live-updated as well, but the
+ // current _all_items design doesn't have a way to support that.
+ if (msg_list.data.filter.is_in_home()) {
+ msg_list.update_muting_and_rerender();
+ }
+ }
// Since muted streams aren't counted in visible unread
// counts, we need to update the rendering of them.