js: Rename muting module to muted_topics.

This commit is contained in:
Priyank Patel
2021-06-28 18:39:04 +00:00
committed by Tim Abbott
parent 968a8c4e50
commit 5f74e78bee
24 changed files with 94 additions and 81 deletions

View File

@@ -12,7 +12,7 @@ import {localstorage} from "./localstorage";
import * as message_store from "./message_store";
import * as message_util from "./message_util";
import * as message_view_header from "./message_view_header";
import * as muting from "./muting";
import * as muted_topics from "./muted_topics";
import * as narrow from "./narrow";
import * as narrow_state from "./narrow_state";
import * as navbar_alerts from "./navbar_alerts";
@@ -233,7 +233,7 @@ function format_topic(topic_data) {
// We only supply the data to the topic rows and let jquery
// display / hide them according to filters instead of
// doing complete re-render.
const topic_muted = Boolean(muting.is_topic_muted(stream_id, topic));
const topic_muted = Boolean(muted_topics.is_topic_muted(stream_id, topic));
const stream_muted = stream_data.is_muted(stream_id);
const muted = topic_muted || stream_muted;
const unread_count = unread.num_unread_for_topic(stream_id, topic);
@@ -341,7 +341,7 @@ export function filters_should_hide_topic(topic_data) {
}
if (!filters.has("include_muted")) {
const topic_muted = Boolean(muting.is_topic_muted(msg.stream_id, msg.topic));
const topic_muted = Boolean(muted_topics.is_topic_muted(msg.stream_id, msg.topic));
const stream_muted = stream_data.is_muted(msg.stream_id);
if (topic_muted || stream_muted) {
return true;