mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2025-12-24 00:07:48 -05:00
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:
@@ -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) },
|
||||
|
||||
@@ -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,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user