mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 08:23:00 +01:00
Disable member label button for users without permission to edit.
This commit is contained in:
committed by
Cody Henthorne
parent
0b2d3edcce
commit
2c747daa50
@@ -853,13 +853,17 @@ 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 = !state.isDeprecatedOrUnregistered,
|
||||
isEnabled = canSetMemberLabel,
|
||||
onClick = {
|
||||
val action = ConversationSettingsFragmentDirections.actionConversationSettingsFragmentToMemberLabelFragment(groupState.groupId)
|
||||
navController.safeNavigate(action)
|
||||
},
|
||||
onDisabledClicked = {
|
||||
Snackbar.make(requireView(), R.string.ConversationSettingsFragment__only_admins_can_add_member_labels, Snackbar.LENGTH_SHORT).show()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5986,6 +5986,8 @@
|
||||
<string name="ConversationSettingsFragment__group_link">Group link</string>
|
||||
<!-- Label for button that opens the group member label permissions screen. -->
|
||||
<string name="ConversationSettingsFragment__group_member_label">Member Label</string>
|
||||
<!-- Snackbar shown when non-admin taps the member label button -->
|
||||
<string name="ConversationSettingsFragment__only_admins_can_add_member_labels">Only admins can add member labels in this group.</string>
|
||||
<!-- Option in conversation settings to add a user as a contact -->
|
||||
<string name="ConversationSettingsFragment__add_as_a_contact">Add as a contact</string>
|
||||
<string name="ConversationSettingsFragment__unmute">Unmute</string>
|
||||
|
||||
Reference in New Issue
Block a user