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.

recent: Rename narrow_to_recent_topics.

evykassirera8ba40c04eff
diff --git a/web/src/left_sidebar_navigation_area.js b/web/src/left_sidebar_navigation_area.js
index 67cbc2bf272..c1c434cbbd3 100644
--- a/web/src/left_sidebar_navigation_area.js
+++ b/web/src/left_sidebar_navigation_area.js
@@ -84,7 +84,7 @@ export function handle_narrow_deactivated() {
$filter_li.addClass("active-filter");
}
-export function narrow_to_recent_topics() {
+export function narrow_to_recent_view() {
remove($(".top_left_all_messages"));
remove($(".top_left_starred_messages"));
remove($(".top_left_mentions"));
diff --git a/web/src/recent_view_ui.js b/web/src/recent_view_ui.js
index a3e212c8670..eb46531da59 100644
--- a/web/src/recent_view_ui.js
+++ b/web/src/recent_view_ui.js
@@ -907,7 +907,7 @@ export function show() {
return;
}
// Hide selected elements in the left sidebar.
- left_sidebar_navigation_area.narrow_to_recent_topics();
+ left_sidebar_navigation_area.narrow_to_recent_view();
stream_list.handle_narrow_deactivated();
// Hide "middle-column" which has html for rendering
diff --git a/web/tests/left_sidebar_navigation_area.test.js b/web/tests/left_sidebar_navigation_area.test.js
index d209d749520..a482667100c 100644
--- a/web/tests/left_sidebar_navigation_area.test.js
+++ b/web/tests/left_sidebar_navigation_area.test.js
@@ -45,7 +45,7 @@ run_test("narrowing", () => {
set_global("setTimeout", (f) => {
f();
});
- left_sidebar_navigation_area.narrow_to_recent_topics();
+ left_sidebar_navigation_area.narrow_to_recent_view();
assert.ok(!$(".top_left_all_messages").hasClass("active-filter"));
assert.ok(!$(".top_left_mentions").hasClass("active-filter"));
assert.ok(!$(".top_left_starred_messages").hasClass("active-filter"));
diff --git a/web/tests/recent_topics.test.js b/web/tests/recent_topics.test.js
index 5b8f7cfc50c..1f5c178e96d 100644
--- a/web/tests/recent_topics.test.js
+++ b/web/tests/recent_topics.test.js
@@ -171,7 +171,7 @@ mock_esm("../src/sub_store", {
},
});
mock_esm("../src/left_sidebar_navigation_area", {
- narrow_to_recent_topics: noop,
+ narrow_to_recent_view: noop,
});
mock_esm("../src/unread", {
num_unread_for_topic(stream_id, topic) {