ui: disable swipe to reply, context menu reply when user can't send (#6822)

This commit is contained in:
spaced4ndy
2026-04-17 09:38:55 +00:00
committed by GitHub
parent 27cab1a575
commit 7d5037f201
3 changed files with 4 additions and 4 deletions
@@ -1953,7 +1953,7 @@ fun BoxScope.ChatItemsList(
}
false
}
val swipeableModifier = if (appPlatform.isDesktop) Modifier else SwipeToDismissModifier(
val swipeableModifier = if (appPlatform.isDesktop || !chatInfo.sendMsgEnabled) Modifier else SwipeToDismissModifier(
state = dismissState,
directions = setOf(DismissDirection.EndToStart),
swipeDistance = with(LocalDensity.current) { 30.dp.toPx() },
@@ -402,7 +402,7 @@ fun ChatItemView(
if (cInfo.featureEnabled(ChatFeature.Reactions) && cItem.allowAddReaction) {
MsgReactionsMenu()
}
if (cItem.meta.itemDeleted == null && !live && !cItem.localNote) {
if (cItem.meta.itemDeleted == null && !live && !cItem.localNote && cInfo.sendMsgEnabled) {
ItemAction(stringResource(MR.strings.reply_verb), painterResource(MR.images.ic_reply), onClick = {
if (composeState.value.editing) {
composeState.value = ComposeState(contextItem = ComposeContextItem.QuotedItem(cItem), useLinkPreviews = useLinkPreviews)