Disable other chat settings when a chat is locked (#10623)

This commit is contained in:
DS Boyce
2026-05-28 11:14:08 -07:00
committed by GitHub
parent af04e8b496
commit 672cebef62
2 changed files with 6 additions and 4 deletions
@@ -217,7 +217,7 @@ function GroupSettings({
type: 'MEMBERS_AND_REQUESTS',
key: 'members-and-requests',
},
...(isOwner
...(isOwner && convo.details.lockStatus === 'unlocked'
? [{type: 'ADD_MEMBERS_LINK', key: 'add-members-link'} as const]
: []),
]
@@ -457,7 +457,7 @@ function SettingsHeader({
]}>
<SettingsButton
color={convo.view.muted ? 'negative_subtle' : 'secondary'}
disabled={!isReady || isMuting}
disabled={!isReady || isMuting || lockStatus !== 'unlocked'}
icon={convo.view.muted ? BellOffIcon : BellIcon}
label={
convo.view.muted
@@ -469,7 +469,7 @@ function SettingsHeader({
/>
{isOwner ? (
<SettingsButton
disabled={!isReady || isEditingName}
disabled={!isReady || isEditingName || lockStatus !== 'unlocked'}
icon={EditIcon}
label={l`Edit this group chats name`}
text={l`Edit name`}
@@ -83,7 +83,9 @@ export function MessagesListGroupInfoPanel({
)
}
const showButtons = isOwner || isJoinLinkEnabled
const isLocked = convo.details.lockStatus !== 'unlocked'
const showButtons = !isLocked && (isOwner || isJoinLinkEnabled)
return (
<>