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.

left_sidebar_navigation_area: Rename narrow_to_recent_topics.

Aman Agrawala5dafa383ceb
diff --git a/web/src/left_sidebar_navigation_area.js b/web/src/left_sidebar_navigation_area.js
index 97537f6da78..3c8fad2a541 100644
--- a/web/src/left_sidebar_navigation_area.js
+++ b/web/src/left_sidebar_navigation_area.js
@@ -87,7 +87,7 @@ export function handle_narrow_deactivated() {
$filter_li.addClass("active-filter");
}
-export function narrow_to_recent_view() {
+export function highlight_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 591e02fec71..686923694d2 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_view();
+ left_sidebar_navigation_area.highlight_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 a482667100c..d479e8990d1 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_view();
+ left_sidebar_navigation_area.highlight_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_view.test.js b/web/tests/recent_view.test.js
index 187517873c4..666526bd444 100644
--- a/web/tests/recent_view.test.js
+++ b/web/tests/recent_view.test.js
@@ -171,7 +171,7 @@ mock_esm("../src/sub_store", {
},
});
mock_esm("../src/left_sidebar_navigation_area", {
- narrow_to_recent_view: noop,
+ highlight_recent_view: noop,
});
mock_esm("../src/unread", {
num_unread_for_topic(stream_id, topic) {