Add first time in group check.

This commit is contained in:
Alex Hart
2023-08-04 13:23:43 -03:00
parent adb1e292bf
commit 9382bbd8fd
3 changed files with 43 additions and 0 deletions

View File

@@ -106,4 +106,10 @@ class GroupManagementRepository @JvmOverloads constructor(private val context: C
SignalDatabase.groups.removeUnmigratedV1Members(groupId)
}.subscribeOn(Schedulers.io())
}
fun isJustSelf(groupId: GroupId): Single<Boolean> {
return Single.fromCallable {
SignalDatabase.groups.requireGroup(groupId).members == listOf(Recipient.self().id)
}
}
}