Group database cleanup.

This commit is contained in:
Anton Chekulaev 2020-10-01 21:26:28 +10:00
parent fcba710a32
commit fa02d41691

View File

@ -274,15 +274,6 @@ public class GroupDatabase extends Database implements LokiGroupDatabaseProtocol
Recipient.applyCached(Address.fromSerialized(groupId), recipient -> recipient.setGroupAvatarId(avatarId == 0 ? null : avatarId));
}
public boolean hasAvatar(String groupId) {
try (Cursor cursor = databaseHelper.getReadableDatabase().rawQuery(
"SELECT EXISTS(SELECT 1 FROM "+TABLE_NAME+" WHERE "+GROUP_ID+" == ? AND "+AVATAR+" NOT NULL LIMIT 1)",
new String[]{groupId})) {
cursor.moveToFirst();
return cursor.getInt(0) == 1;
}
}
public void updateMembers(String groupId, List<Address> members) {
Collections.sort(members);