user_topics: Rename 'muted_topics_ui' to 'user_topics_ui'.

This commit renames the file 'muted_topics_ui.js' to
'user_topics_ui.js', as we also support visibility policies
other than MUTED.
This commit is contained in:
Prakhar Pratyush 2023-06-24 11:27:58 +05:30 committed by Tim Abbott
parent 2c8c56184a
commit 32b201d5e0
6 changed files with 9 additions and 9 deletions

View File

@ -124,7 +124,6 @@ EXEMPT_FILES = make_set(
"web/src/message_view_header.js", "web/src/message_view_header.js",
"web/src/message_viewport.js", "web/src/message_viewport.js",
"web/src/messages_overlay_ui.ts", "web/src/messages_overlay_ui.ts",
"web/src/muted_topics_ui.js",
"web/src/muted_users_ui.js", "web/src/muted_users_ui.js",
"web/src/narrow.js", "web/src/narrow.js",
"web/src/navbar_alerts.js", "web/src/navbar_alerts.js",
@ -230,6 +229,7 @@ EXEMPT_FILES = make_set(
"web/src/user_status.js", "web/src/user_status.js",
"web/src/user_status_ui.js", "web/src/user_status_ui.js",
"web/src/user_topics.js", "web/src/user_topics.js",
"web/src/user_topics_ui.js",
"web/src/webpack_public_path.js", "web/src/webpack_public_path.js",
"web/src/zcommand.js", "web/src/zcommand.js",
"web/src/zform.js", "web/src/zform.js",

View File

@ -26,7 +26,6 @@ import * as list_util from "./list_util";
import * as message_edit from "./message_edit"; import * as message_edit from "./message_edit";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists";
import * as message_scroll from "./message_scroll"; import * as message_scroll from "./message_scroll";
import * as muted_topics_ui from "./muted_topics_ui";
import * as narrow from "./narrow"; import * as narrow from "./narrow";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state";
import * as navigate from "./navigate"; import * as navigate from "./navigate";
@ -48,6 +47,7 @@ import * as stream_settings_ui from "./stream_settings_ui";
import * as topic_zoom from "./topic_zoom"; import * as topic_zoom from "./topic_zoom";
import * as unread_ops from "./unread_ops"; import * as unread_ops from "./unread_ops";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings";
import * as user_topics_ui from "./user_topics_ui";
function do_narrow_action(action) { function do_narrow_action(action) {
action(message_lists.current.selected_id(), {trigger: "hotkey"}); action(message_lists.current.selected_id(), {trigger: "hotkey"});
@ -1027,7 +1027,7 @@ export function process_hotkey(e, hotkey) {
return true; return true;
} }
case "toggle_topic_visibility_policy": case "toggle_topic_visibility_policy":
muted_topics_ui.toggle_topic_visibility_policy(msg); user_topics_ui.toggle_topic_visibility_policy(msg);
return true; return true;
case "toggle_message_collapse": case "toggle_message_collapse":
condense.toggle_collapse(msg); condense.toggle_collapse(msg);

View File

@ -23,7 +23,6 @@ import * as message_edit from "./message_edit";
import * as message_events from "./message_events"; import * as message_events from "./message_events";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists";
import * as message_live_update from "./message_live_update"; import * as message_live_update from "./message_live_update";
import * as muted_topics_ui from "./muted_topics_ui";
import * as muted_users_ui from "./muted_users_ui"; import * as muted_users_ui from "./muted_users_ui";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state";
import * as navbar_alerts from "./navbar_alerts"; import * as navbar_alerts from "./navbar_alerts";
@ -80,6 +79,7 @@ import * as user_groups from "./user_groups";
import * as user_groups_settings_ui from "./user_groups_settings_ui"; import * as user_groups_settings_ui from "./user_groups_settings_ui";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings";
import * as user_status from "./user_status"; import * as user_status from "./user_status";
import * as user_topics_ui from "./user_topics_ui";
export function dispatch_normal_event(event) { export function dispatch_normal_event(event) {
const noop = function () {}; const noop = function () {};
@ -904,7 +904,7 @@ export function dispatch_normal_event(event) {
break; break;
case "user_topic": case "user_topic":
muted_topics_ui.handle_topic_updates(event); user_topics_ui.handle_topic_updates(event);
break; break;
} }
} }

View File

@ -31,7 +31,7 @@ const hotspots = mock_esm("../src/hotspots");
const linkifiers = mock_esm("../src/linkifiers"); const linkifiers = mock_esm("../src/linkifiers");
const message_events = mock_esm("../src/message_events"); const message_events = mock_esm("../src/message_events");
const message_lists = mock_esm("../src/message_lists"); const message_lists = mock_esm("../src/message_lists");
const muted_topics_ui = mock_esm("../src/muted_topics_ui"); const user_topics_ui = mock_esm("../src/user_topics_ui");
const muted_users_ui = mock_esm("../src/muted_users_ui"); const muted_users_ui = mock_esm("../src/muted_users_ui");
const notifications = mock_esm("../src/notifications"); const notifications = mock_esm("../src/notifications");
const pm_list = mock_esm("../src/pm_list"); const pm_list = mock_esm("../src/pm_list");
@ -322,7 +322,7 @@ run_test("muted_topics", ({override}) => {
const event = event_fixtures.user_topic; const event = event_fixtures.user_topic;
const stub = make_stub(); const stub = make_stub();
override(muted_topics_ui, "handle_topic_updates", stub.f); override(user_topics_ui, "handle_topic_updates", stub.f);
dispatch(event); dispatch(event);
assert.equal(stub.num_calls, 1); assert.equal(stub.num_calls, 1);
const args = stub.get_args("user_topic"); const args = stub.get_args("user_topic");

View File

@ -47,7 +47,7 @@ const lightbox = mock_esm("../src/lightbox");
const list_util = mock_esm("../src/list_util"); const list_util = mock_esm("../src/list_util");
const message_edit = mock_esm("../src/message_edit"); const message_edit = mock_esm("../src/message_edit");
const message_lists = mock_esm("../src/message_lists"); const message_lists = mock_esm("../src/message_lists");
const muted_topics_ui = mock_esm("../src/muted_topics_ui"); const user_topics_ui = mock_esm("../src/user_topics_ui");
const narrow = mock_esm("../src/narrow"); const narrow = mock_esm("../src/narrow");
const narrow_state = mock_esm("../src/narrow_state", { const narrow_state = mock_esm("../src/narrow_state", {
is_message_feed_visible: () => true, is_message_feed_visible: () => true,
@ -425,7 +425,7 @@ run_test("emoji picker", ({override}) => {
run_test("G/M keys", () => { run_test("G/M keys", () => {
// TODO: move // TODO: move
assert_mapping("G", navigate, "to_end"); assert_mapping("G", navigate, "to_end");
assert_mapping("M", muted_topics_ui, "toggle_topic_visibility_policy"); assert_mapping("M", user_topics_ui, "toggle_topic_visibility_policy");
}); });
run_test("n/p keys", () => { run_test("n/p keys", () => {