Add "Group Members" section to ConversationList search results.

This commit is contained in:
Alex Hart
2023-01-26 14:10:38 -04:00
committed by Greyson Parrelli
parent e84c6187b9
commit 09902e5d11
14 changed files with 265 additions and 39 deletions

View File

@@ -190,19 +190,10 @@ public class SearchRepository {
}
}
Set<RecipientId> groupsByMemberIds = new LinkedHashSet<>();
try (GroupTable.Reader reader = SignalDatabase.groups().queryGroupsByMembership(filteredContacts, true, false, false)) {
while ((record = reader.getNext()) != null) {
groupsByMemberIds.add(record.getRecipientId());
}
}
LinkedHashSet<ThreadRecord> output = new LinkedHashSet<>();
output.addAll(getMatchingThreads(contactIds, unreadOnly));
output.addAll(getMatchingThreads(groupsByTitleIds, unreadOnly));
output.addAll(getMatchingThreads(groupsByMemberIds, unreadOnly));
return new ArrayList<>(output);
}