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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,
) {