From f59b5e3a027604997d4538a014f5b77e1442a88b Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Mon, 18 Nov 2024 16:36:17 +0530 Subject: [PATCH] message_fetch: Remove no longer needed check for home filter. `Filter.public_terms` will return the same result even if the narrow is combined feed. Since we are no longer passing empty narrow parameters for combined feed, this condition is not required. --- web/src/message_fetch.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/web/src/message_fetch.ts b/web/src/message_fetch.ts index b51d9b7603..fb2910c2df 100644 --- a/web/src/message_fetch.ts +++ b/web/src/message_fetch.ts @@ -335,16 +335,7 @@ export function load_messages(opts: MessageFetchOptions, attempt = 1): void { blueslip.error("Message list data is undefined!"); } - // This block is a hack; structurally, we want to set - // data.narrow = opts.msg_list.data.filter.public_terms() - // - // But support for the all_messages_data sharing of data with - // the combined feed view and the (hacky) page_params.narrow feature - // requires a somewhat ugly bundle of conditionals. - let narrow_data: NarrowTerm[] = []; - if (!msg_list_data.filter.is_in_home()) { - narrow_data = msg_list_data.filter.public_terms(); - } + let narrow_data = msg_list_data.filter.public_terms(); if (page_params.narrow !== undefined) { narrow_data = [...narrow_data, ...page_params.narrow]; }