Better filtering of contacts in search
This commit is contained in:
parent
292ef1b6f5
commit
7b62576def
1 changed files with 7 additions and 1 deletions
|
@ -333,9 +333,15 @@ async function queryConversationsAndContacts(
|
||||||
|
|
||||||
const normalizedQuery = removeDiacritics(query);
|
const normalizedQuery = removeDiacritics(query);
|
||||||
|
|
||||||
|
const visibleConversations = allConversations.filter(
|
||||||
|
({ activeAt, removalStage }) => {
|
||||||
|
return activeAt != null || removalStage == null;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const searchResults: Array<ConversationType> =
|
const searchResults: Array<ConversationType> =
|
||||||
filterAndSortConversationsByRecent(
|
filterAndSortConversationsByRecent(
|
||||||
allConversations,
|
visibleConversations,
|
||||||
normalizedQuery,
|
normalizedQuery,
|
||||||
regionCode
|
regionCode
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue