Allow any group member to set member labels.

This commit is contained in:
jeffrey-signal
2026-03-03 16:12:38 -05:00
committed by Greyson Parrelli
parent a6c8b940c9
commit 16e63a061d
9 changed files with 10 additions and 20 deletions

View File

@@ -861,17 +861,13 @@ class ConversationSettingsFragment :
)
if (RemoteConfig.sendMemberLabels) {
val canSetMemberLabel = groupState.canSetOwnMemberLabel && !state.isDeprecatedOrUnregistered
clickPref(
title = DSLSettingsText.from(R.string.ConversationSettingsFragment__group_member_label),
icon = DSLSettingsIcon.from(R.drawable.symbol_tag_24),
isEnabled = canSetMemberLabel,
isEnabled = groupState.canSetOwnMemberLabel && !state.isDeprecatedOrUnregistered,
onClick = {
val action = ConversationSettingsFragmentDirections.actionConversationSettingsFragmentToMemberLabelFragment(groupState.groupId)
navController.safeNavigate(action)
},
onDisabledClicked = {
Snackbar.make(requireView(), R.string.GroupMemberLabel__error_no_edit_permission, Snackbar.LENGTH_SHORT).show()
}
)
}

View File

@@ -522,8 +522,8 @@ sealed class ConversationSettingsViewModel(
}
}
private fun loadCanSetMemberLabel(v2GroupId: GroupId.V2) = viewModelScope.launch(SignalDispatchers.IO) {
val canSetLabel = MemberLabelRepository.instance.canSetLabel(v2GroupId, Recipient.self())
private fun loadCanSetMemberLabel(groupId: GroupId.V2) = viewModelScope.launch(SignalDispatchers.IO) {
val canSetLabel = MemberLabelRepository.instance.canSetLabel(groupId, Recipient.self())
store.update {
it.copy(
specificSettingsState = it.requireGroupSettingsState().copy(