Use recipientId's in SearchRepository.
This commit is contained in:
parent
bae381e6f8
commit
d026498a8c
1 changed files with 3 additions and 8 deletions
|
@ -130,7 +130,7 @@ public class SearchRepository {
|
|||
Cursor systemContacts = contactRepository.queryNonSignalContacts(query);
|
||||
MergeCursor contacts = new MergeCursor(new Cursor[]{ textSecureContacts, systemContacts });
|
||||
|
||||
return new CursorList<>(contacts, new RecipientModelBuilder(context));
|
||||
return new CursorList<>(contacts, new RecipientModelBuilder());
|
||||
}
|
||||
|
||||
private CursorList<ThreadRecord> queryConversations(@NonNull String query) {
|
||||
|
@ -178,15 +178,10 @@ public class SearchRepository {
|
|||
|
||||
private static class RecipientModelBuilder implements CursorList.ModelBuilder<Recipient> {
|
||||
|
||||
private final Context context;
|
||||
|
||||
RecipientModelBuilder(@NonNull Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recipient build(@NonNull Cursor cursor) {
|
||||
return Recipient.external(context, cursor.getString(1));
|
||||
long recipientId = cursor.getLong(cursor.getColumnIndexOrThrow(ContactRepository.ID_COLUMN));
|
||||
return Recipient.resolved(RecipientId.from(recipientId));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue