feat(messaging): Add double-tap to react with 👍 (#3972)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich
2025-12-11 17:37:38 -06:00
committed by GitHub
parent f95c2962dd
commit 540814da01
2 changed files with 3 additions and 1 deletions

View File

@@ -253,6 +253,7 @@ private fun LazyItemScope.renderPagedChatMessageRow(
state.selectedIds.toggle(message.uuid)
haptics.performHapticFeedback(HapticFeedbackType.LongPress)
},
onDoubleClick = { if (!inSelectionMode) handlers.onSendReaction("👍", message.packetId) },
onClickChip = handlers.onClickChip,
onStatusClick = { onShowStatusDialog(message) },
onReply = { handlers.onReply(message) },

View File

@@ -80,6 +80,7 @@ internal fun MessageItem(
emojis: List<Reaction> = emptyList(),
onClick: () -> Unit = {},
onLongClick: () -> Unit = {},
onDoubleClick: () -> Unit = {},
onClickChip: (Node) -> Unit = {},
onStatusClick: () -> Unit = {},
onNavigateToOriginalMessage: (Int) -> Unit = {},
@@ -120,7 +121,7 @@ internal fun MessageItem(
start = if (!message.fromLocal) 0.dp else 16.dp,
end = if (message.fromLocal) 0.dp else 16.dp,
)
.combinedClickable(onClick = onClick, onLongClick = onLongClick)
.combinedClickable(onClick = onClick, onLongClick = onLongClick, onDoubleClick = onDoubleClick)
.then(messageModifier),
colors = cardColors,
) {