user_settings: Add new user setting to show/hide unread counts on streams.

Added a show_unread_counts personal user setting to the
Settings > Display settings > Advanced section which
lets user choose whether he/she wants to see unread messages
count on the left sidebar for streams.

This setting have three options,
"All Streams" - This will show unread messages count for all
streams.
"Unmuted Stream" - This will be default option and it will
only show unread messages count for unmuted streams.
"No Stream" - This option will not show unread messages count
on any stream.

Fixes #24149
This commit is contained in:
Lalit
2023-04-25 17:07:16 +05:30
committed by Tim Abbott
parent fb165f1901
commit 0e73b5547c
16 changed files with 165 additions and 8 deletions

View File

@@ -689,6 +689,7 @@ export function dispatch_normal_event(event) {
"translate_emoticons",
"display_emoji_reaction_users",
"user_list_style",
"web_stream_unreads_count_display_policy",
"starred_message_counts",
"send_stream_typing_notifications",
"send_private_typing_notifications",
@@ -735,6 +736,9 @@ export function dispatch_normal_event(event) {
stream_list.update_streams_sidebar();
stream_list_sort.set_filter_out_inactives();
}
if (event.property === "web_stream_unreads_count_display_policy") {
stream_list.update_dom_unread_counts_visibility();
}
if (event.property === "user_list_style") {
settings_display.report_user_list_style_change(
settings_display.user_settings_panel,