Skip to content

Commit bd8d4a9

Browse files
committed
fix: remove redundant param
1 parent 4c682ff commit bd8d4a9

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/components/Search/SearchFiltersParticipantsSelector.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate}:
105105
true,
106106
undefined,
107107
reportAttributesDerived,
108-
true,
109108
);
110109

111110
const selectedCurrentUser = formattedResults.section.data.find((option) => option.accountID === chatOptions.currentUserOption?.accountID);

src/libs/OptionsListUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,7 +2340,6 @@ function formatSectionsFromSearchTerm(
23402340
shouldGetOptionDetails = false,
23412341
filteredWorkspaceChats: OptionData[] = [],
23422342
reportAttributesDerived?: ReportAttributesDerivedValue['reports'],
2343-
includeCurrentUserSearchTerm = false,
23442343
): SectionForSearchTerm {
23452344
// We show the selected participants at the top of the list when there is no search term or maximum number of participants has already been selected
23462345
// However, if there is a search term we remove the selected participants from the top of the list unless they are part of the search results
@@ -2365,7 +2364,7 @@ function formatSectionsFromSearchTerm(
23652364
// This will add them to the list of options, deduping them if they already exist in the other lists
23662365
const selectedParticipantsWithoutDetails = selectedOptions.filter((participant) => {
23672366
const accountID = participant.accountID ?? null;
2368-
const searchTerms = includeCurrentUserSearchTerm && currentUserAccountID === accountID ? getCurrentUserSearchTerms(participant) : getPersonalDetailSearchTerms(participant);
2367+
const searchTerms = currentUserAccountID === accountID ? getCurrentUserSearchTerms(participant) : getPersonalDetailSearchTerms(participant);
23692368
const isPartOfSearchTerm = searchTerms.join(' ').toLowerCase().includes(cleanSearchTerm);
23702369
const isReportInRecentReports = filteredRecentReports.some((report) => report.accountID === accountID) || filteredWorkspaceChats.some((report) => report.accountID === accountID);
23712370
const isReportInPersonalDetails = filteredPersonalDetails.some((personalDetail) => personalDetail.accountID === accountID);

0 commit comments

Comments
 (0)