Skip to content

Commit

Permalink
Better filtering of contacts in search
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Nov 15, 2023
1 parent 292ef1b commit 7b62576
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ts/state/ducks/search.ts
Expand Up @@ -333,9 +333,15 @@ async function queryConversationsAndContacts(

const normalizedQuery = removeDiacritics(query);

const visibleConversations = allConversations.filter(
({ activeAt, removalStage }) => {
return activeAt != null || removalStage == null;
}
);

const searchResults: Array<ConversationType> =
filterAndSortConversationsByRecent(
allConversations,
visibleConversations,
normalizedQuery,
regionCode
);
Expand Down

0 comments on commit 7b62576

Please sign in to comment.