mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
left_sidebar: Simplify deselection with deselect_top_left_corner_item.
Refactoring to avoid duplication, improve readability, and standardize deselection logic by converting calls to remove to deselect_top_left_corner_items.
This commit is contained in:
parent
497bd740e9
commit
afe3bcd6c5
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user