mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Add Reminders and Conversation Banner to CFv2.
This commit is contained in:
@@ -7,6 +7,7 @@ import org.signal.storageservice.protos.groups.local.EnabledState
|
||||
import org.thoughtcrime.securesms.database.GroupTable
|
||||
import org.thoughtcrime.securesms.groups.GroupAccessControl
|
||||
import org.thoughtcrime.securesms.groups.GroupId
|
||||
import org.thoughtcrime.securesms.groups.GroupsV1MigrationUtil
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
@@ -118,6 +119,28 @@ class GroupRecord(
|
||||
}
|
||||
}
|
||||
|
||||
val actionableRequestingMembersCount: Int by lazy {
|
||||
if (isV2Group && memberLevel(Recipient.self()) == GroupTable.MemberLevel.ADMINISTRATOR) {
|
||||
requireV2GroupProperties()
|
||||
.decryptedGroup
|
||||
.requestingMembersCount
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
val gv1MigrationSuggestions: List<RecipientId> by lazy {
|
||||
if (!isActive || !isV2Group || isPendingMember(Recipient.self())) {
|
||||
emptyList()
|
||||
} else {
|
||||
unmigratedV1Members
|
||||
.filterNot { members.contains(it) }
|
||||
.map { Recipient.resolved(it) }
|
||||
.filter { GroupsV1MigrationUtil.isAutoMigratable(it) }
|
||||
.map { it.id }
|
||||
}
|
||||
}
|
||||
|
||||
fun hasAvatar(): Boolean {
|
||||
return avatarId != 0L
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user