From 81a0bdc2d2aa6f37ba4cb1f671af8afab6ba496e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 8 Nov 2024 14:23:11 -0700 Subject: [PATCH 1/2] fix sort on multiple statuses --- src/components/Search/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 77d50e0e4ed5..0ab52f633e81 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -406,7 +406,7 @@ function Search({queryJSON, onSearchListScroll, contentContainerStyle}: SearchPr }; const shouldShowYear = SearchUIUtils.shouldShowYear(searchResults?.data); - const shouldShowSorting = Array.isArray(status) ? status.some((s) => sortableSearchStatuses.includes(s)) : sortableSearchStatuses.includes(status); + const shouldShowSorting = Array.isArray(status) ? false : sortableSearchStatuses.includes(status); return ( From 754a11c8dbc3532bb4201055c8bdceb4c75c674d Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 8 Nov 2024 14:29:44 -0700 Subject: [PATCH 2/2] simplify condition --- src/components/Search/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 0ab52f633e81..bb2af7d81358 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -406,7 +406,7 @@ function Search({queryJSON, onSearchListScroll, contentContainerStyle}: SearchPr }; const shouldShowYear = SearchUIUtils.shouldShowYear(searchResults?.data); - const shouldShowSorting = Array.isArray(status) ? false : sortableSearchStatuses.includes(status); + const shouldShowSorting = !Array.isArray(status) && sortableSearchStatuses.includes(status); return (