feat(reactions): double-tap to react and configurable message swipe actions

Add two reaction UX improvements on top of the send-reaction feature:

- Double-tap a message bubble to send the configured default reaction
  emoji. A single GestureDetector on the item root now handles tap,
  double-tap and long-press, leaving child view touch handling intact.

- Configurable per-direction message swipe actions (none, react, reply,
  copy, forward, delete) via a new MessageItemTouchCallback that always
  snaps the row back after a swipe. Adds a settings screen for the swipe
  actions and a default-reaction emoji picker, backed by new preferences.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
octoshrimpy
2026-06-14 11:52:14 -04:00
parent 88b57ee9d0
commit 5b29290ce1
18 changed files with 584 additions and 19 deletions
@@ -84,6 +84,15 @@ class Preferences @Inject constructor(
const val MESSAGE_LINK_HANDLING_BLOCK = 0
const val MESSAGE_LINK_HANDLING_ALLOW = 1
const val MESSAGE_LINK_HANDLING_ASK = 2
const val MESSAGE_SWIPE_ACTION_NONE = 0
const val MESSAGE_SWIPE_ACTION_REACT = 1 // open reaction picker
const val MESSAGE_SWIPE_ACTION_REPLY = 2 // focus compose box
const val MESSAGE_SWIPE_ACTION_COPY = 3 // copy text to clipboard
const val MESSAGE_SWIPE_ACTION_FORWARD = 4
const val MESSAGE_SWIPE_ACTION_DELETE = 5
const val DEFAULT_REACTION_EMOJI = "👍"
}
// Internal
@@ -123,6 +132,9 @@ class Preferences @Inject constructor(
val sendDelay = rxPrefs.getInteger("sendDelay", SEND_DELAY_NONE)
val swipeRight = rxPrefs.getInteger("swipeRight", SWIPE_ACTION_ARCHIVE)
val swipeLeft = rxPrefs.getInteger("swipeLeft", SWIPE_ACTION_ARCHIVE)
val defaultReactionEmoji = rxPrefs.getString("defaultReactionEmoji", DEFAULT_REACTION_EMOJI)
val messageSwipeRight = rxPrefs.getInteger("messageSwipeRight", MESSAGE_SWIPE_ACTION_REACT)
val messageSwipeLeft = rxPrefs.getInteger("messageSwipeLeft", MESSAGE_SWIPE_ACTION_REPLY)
val autoEmoji = rxPrefs.getBoolean("autoEmoji", true)
val delivery = rxPrefs.getBoolean("delivery", false)
val signature = rxPrefs.getString("signature", "")