Skip to content

Commit

Permalink
Display 'Unknown group' for groups with no name.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal committed Jun 10, 2020
1 parent e13f325 commit 400c592
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -215,13 +215,15 @@ public GroupId.Mms getOrCreateMmsGroupForMembers(List<RecipientId> members) {
}
}

public List<String> getPushGroupNamesContainingMember(RecipientId recipientId) {
@WorkerThread
public List<String> getPushGroupNamesContainingMember(@NonNull RecipientId recipientId) {
return Stream.of(getPushGroupsContainingMember(recipientId))
.map(GroupRecord::getTitle)
.map(groupRecord -> Recipient.resolved(groupRecord.getRecipientId()).getDisplayName(context))
.toList();
}

public List<GroupRecord> getPushGroupsContainingMember(RecipientId recipientId) {
@WorkerThread
public @NonNull List<GroupRecord> getPushGroupsContainingMember(@NonNull RecipientId recipientId) {
SQLiteDatabase database = databaseHelper.getReadableDatabase();
String table = TABLE_NAME + " INNER JOIN " + ThreadDatabase.TABLE_NAME + " ON " + TABLE_NAME + "." + RECIPIENT_ID + " = " + ThreadDatabase.TABLE_NAME + "." + ThreadDatabase.RECIPIENT_ID;
String query = MEMBERS + " LIKE ? AND " + MMS + " = ?";
Expand Down

0 comments on commit 400c592

Please sign in to comment.