mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
left_sidebar: Add unread markers to channel section headers.
This commit is contained in:
@@ -17,6 +17,7 @@ import * as compose_actions from "./compose_actions.ts";
|
||||
import type {Filter} from "./filter.ts";
|
||||
import * as hash_util from "./hash_util.ts";
|
||||
import * as keydown_util from "./keydown_util.ts";
|
||||
import * as left_sidebar_navigation_area from "./left_sidebar_navigation_area.ts";
|
||||
import {ListCursor} from "./list_cursor.ts";
|
||||
import * as narrow_state from "./narrow_state.ts";
|
||||
import * as pm_list from "./pm_list.ts";
|
||||
@@ -321,6 +322,8 @@ export function build_stream_list(force_rerender: boolean): void {
|
||||
add_sidebar_li(stream_id, $(`#stream-list-${section.id}`));
|
||||
}
|
||||
}
|
||||
// Rerendering can moving channels between folders and change heading unread counts.
|
||||
left_sidebar_navigation_area.update_dom_with_unread_counts(unread.get_counts(), false);
|
||||
sidebar_ui.update_unread_counts_visibility();
|
||||
collapse_collapsed_sections();
|
||||
}
|
||||
@@ -1124,7 +1127,10 @@ export function set_event_handlers({
|
||||
"click",
|
||||
".stream-list-section-container .add-stream-icon-container",
|
||||
(e) => {
|
||||
// To prevent toggling the header
|
||||
// The browser default behavior of following the href on
|
||||
// this link is correct. But we need to avoid triggering
|
||||
// the click handler for the containing row, though (which
|
||||
// would toggle the section).
|
||||
e.stopPropagation();
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user