From bf68eb565893866ff9a8269407c723500fba85c3 Mon Sep 17 00:00:00 2001 From: Arne Date: Fri, 19 Apr 2024 12:07:46 +0200 Subject: [PATCH] tap on message_box instead of messageBody to show quick reactions popup --- .../conversations/ui/adapter/MessageAdapter.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index b84b0c6f8..7c7c404c1 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -1682,6 +1682,7 @@ public class MessageAdapter extends ArrayAdapter { } }); } + // Reactions popup ReactionsConfig config = new ReactionsConfigBuilder(activity) .withReactions(new int[]{ @@ -1694,7 +1695,7 @@ public class MessageAdapter extends ArrayAdapter { }) .build(); - ReactionPopup popup = new ReactionPopup(activity, config, (position) -> { + ReactionPopup reactionPopup = new ReactionPopup(activity, config, (position) -> { if (position.equals(0)) { mConversationFragment.setupReply(message[0]); while (message[0].mergeable(message[0].next())) { @@ -1820,16 +1821,12 @@ public class MessageAdapter extends ArrayAdapter { } }); - - - - // Treat touch-up as click so we don't have to touch twice // (touch twice is because it's waiting to see if you double-touch for text selection) - viewHolder.messageBody.setOnTouchListener((v, event) -> { + viewHolder.message_box.setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_UP) { if (MessageAdapter.this.mOnMessageBoxClickedListener != null) { - popup.onTouch(v, event); + reactionPopup.onTouch(v, event); } } return false;