Better filtering of contacts in search

This commit is contained in:
Fedor Indutny 2023-11-15 01:39:17 +01:00 committed by GitHub
parent 292ef1b6f5
commit 7b62576def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
);