mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Hide "Add to a group" if you don't have any groups.
This commit is contained in:
committed by
Greyson Parrelli
parent
f3dbe4416f
commit
137cd45497
@@ -251,6 +251,20 @@ public final class GroupDatabase extends Database {
|
||||
return new Reader(cursor);
|
||||
}
|
||||
|
||||
public int getActiveGroupCount() {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
String[] cols = { "COUNT(*)" };
|
||||
String query = ACTIVE + " = 1";
|
||||
|
||||
try (Cursor cursor = db.query(TABLE_NAME, cols, query, null, null, null, null)) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
return cursor.getInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
public @NonNull List<Recipient> getGroupMembers(@NonNull GroupId groupId, @NonNull MemberSet memberSet) {
|
||||
if (groupId.isV2()) {
|
||||
|
||||
Reference in New Issue
Block a user