mirror of https://github.com/zulip/zulip.git
left_sidebar: Fix section divider not shown when all streams are muted.
This fixes a bug where when all the streams in a section in the left sidebar are muted, the section divider disappears. The bug is caused by not considering muted streams when writing the logic for when to show/not show section divider this commit fixes it. fixes #23241.
This commit is contained in:
parent
8241e2d353
commit
a451fe861e
|
@ -142,9 +142,12 @@ export function build_stream_list(force_rerender) {
|
||||||
topic_list.clear();
|
topic_list.clear();
|
||||||
$parent.empty();
|
$parent.empty();
|
||||||
|
|
||||||
const any_pinned_streams = stream_groups.pinned_streams.length > 0;
|
const any_pinned_streams =
|
||||||
const any_normal_streams = stream_groups.normal_streams.length > 0;
|
stream_groups.pinned_streams.length > 0 || stream_groups.muted_pinned_streams.length > 0;
|
||||||
|
const any_normal_streams =
|
||||||
|
stream_groups.normal_streams.length > 0 || stream_groups.muted_active_streams.length > 0;
|
||||||
const any_dormant_streams = stream_groups.dormant_streams.length > 0;
|
const any_dormant_streams = stream_groups.dormant_streams.length > 0;
|
||||||
|
|
||||||
const need_section_subheaders =
|
const need_section_subheaders =
|
||||||
(any_pinned_streams ? 1 : 0) +
|
(any_pinned_streams ? 1 : 0) +
|
||||||
(any_normal_streams ? 1 : 0) +
|
(any_normal_streams ? 1 : 0) +
|
||||||
|
|
Loading…
Reference in New Issue