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: Simplify deselection with deselect_top_left_corner_item.

Rinwaoluwaafe3bcd6c58f
diff --git a/web/src/left_sidebar_navigation_area.js b/web/src/left_sidebar_navigation_area.js
index a489f00d817..9793c52ce3b 100644
--- a/web/src/left_sidebar_navigation_area.js
+++ b/web/src/left_sidebar_navigation_area.js
@@ -154,10 +154,8 @@ function do_new_messages_animation($li) {
}
export function highlight_inbox_view() {
- remove($(".top_left_all_messages"));
- remove($(".top_left_starred_messages"));
- remove($(".top_left_recent_view"));
- remove($(".top_left_mentions"));
+ deselect_top_left_corner_items();
+
$(".top_left_inbox").addClass("active-filter");
setTimeout(() => {
resize.resize_stream_filters_container();
@@ -165,10 +163,8 @@ export function highlight_inbox_view() {
}
export function highlight_recent_view() {
- remove($(".top_left_all_messages"));
- remove($(".top_left_starred_messages"));
- remove($(".top_left_mentions"));
- remove($(".top_left_inbox"));
+ deselect_top_left_corner_items();
+
$(".top_left_recent_view").addClass("active-filter");
setTimeout(() => {
resize.resize_stream_filters_container();
@@ -176,10 +172,8 @@ export function highlight_recent_view() {
}
export function highlight_all_messages_view() {
- remove($(".top_left_starred_messages"));
- remove($(".top_left_mentions"));
- remove($(".top_left_recent_view"));
- remove($(".top_left_inbox"));
+ deselect_top_left_corner_items();
+
$(".top_left_all_messages").addClass("active-filter");
setTimeout(() => {
resize.resize_stream_filters_container();