Inline the receive member labels feaure flag.

This commit is contained in:
jeffrey-signal
2026-03-09 15:58:19 -04:00
parent 276662026e
commit 374347da04
2 changed files with 0 additions and 21 deletions

View File

@@ -55,10 +55,6 @@ class MemberLabelRepository private constructor(
*/
@WorkerThread
fun getLabelSync(groupId: GroupId.V2, recipient: Recipient): MemberLabel? {
if (!RemoteConfig.receiveMemberLabels) {
return null
}
val aci = recipient.serviceId.orNull() as? ServiceId.ACI ?: return null
val groupRecord = groupsTable.getGroup(groupId).orNull() ?: return null
@@ -70,10 +66,6 @@ class MemberLabelRepository private constructor(
*/
@WorkerThread
fun getLabelsSync(groupId: GroupId.V2, recipients: Collection<Recipient>): Map<RecipientId, MemberLabel> {
if (!RemoteConfig.receiveMemberLabels) {
return emptyMap()
}
val groupRecord = groupsTable.getGroup(groupId).orNull() ?: return emptyMap()
val labelsByAci = groupRecord.requireV2GroupProperties().memberLabelsByAci()
@@ -131,10 +123,6 @@ class MemberLabelRepository private constructor(
* Returns all group members who have labels set for the given group.
*/
suspend fun getMembersWithLabels(groupId: GroupId.V2): List<GroupMemberWithLabel> = withContext(Dispatchers.IO) {
if (!RemoteConfig.receiveMemberLabels) {
return@withContext emptyList()
}
val groupRecord = groupsTable.getGroup(groupId).orNull() ?: return@withContext emptyList()
val groupProperties = groupRecord.requireV2GroupProperties()

View File

@@ -1278,15 +1278,6 @@ object RemoteConfig {
hotSwappable = true
)
/**
* Whether to receive and display group member labels.
*/
val receiveMemberLabels: Boolean by remoteBoolean(
key = "android.receiveMemberLabels.2",
defaultValue = false,
hotSwappable = true
)
/**
* Whether to enable modifying group member labels.
*/