Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Fix unicorn/prefer-smaller-scope.
Anders Kaseorg91da93427b29
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.tsindex 030cf15f206..c4959f553ed 100644--- a/web/src/inbox_ui.ts+++ b/web/src/inbox_ui.ts@@ -2115,8 +2115,8 @@ export function update_internal(): void {const stream_unread = unread.unread_count_info_for_stream(stream_id);const stream_unread_count = stream_unread.unmuted_count + stream_unread.muted_count;const stream_key = get_stream_key(stream_id);- let stream_post_filter_unread_count = 0;if (stream_unread_count > 0) {+ let stream_post_filter_unread_count = 0;const stream_topics_data = topics_dict.get(stream_key);// Stream isn't rendered.diff --git a/web/src/message_fetch.ts b/web/src/message_fetch.tsindex 798de76127e..b19d6bb90e2 100644--- a/web/src/message_fetch.ts+++ b/web/src/message_fetch.ts@@ -167,8 +167,8 @@ function process_result(data: MessageFetchResponse, opts: MessageFetchOptions):// messages not tracked in unread.ts during this fetching process.message_util.do_unread_count_updates(messages, true);- const is_contiguous_history = true;if (messages.length > 0) {+ const is_contiguous_history = true;if (opts.msg_list) {if (opts.validate_filter_topic_post_fetch) {opts.msg_list.data.filter.try_adjusting_for_moved_with_target(messages[0]);diff --git a/web/src/recent_view_ui.ts b/web/src/recent_view_ui.tsindex 49b39ce4a51..96503c3de97 100644--- a/web/src/recent_view_ui.ts+++ b/web/src/recent_view_ui.ts@@ -369,8 +369,8 @@ function update_load_more_banner(): void {}function get_min_load_count(already_rendered_count: number, load_count: number): number {- const extra_rows_for_viewing_pleasure = 15;if (row_focus > already_rendered_count + load_count) {+ const extra_rows_for_viewing_pleasure = 15;return row_focus + extra_rows_for_viewing_pleasure - already_rendered_count;}return load_count;