Skip to content

Conversation

@sharanya08p
Copy link
Contributor

@sharanya08p sharanya08p commented Oct 29, 2025

🎯 Goal

On certain Android devices, tapping on images in messages requires multiple taps to work when enableSwipeToReply is enabled. The issue occurs because the pan gesture detector intercepts touch events before they can reach the image Pressable components.

🛠 Implementation details

This pull request introduces an improvement to the swipe gesture handling in the SwipableMessageBubble component. The change ensures that swipe gestures are only activated when the user's touch movement exceeds a minimum distance, which helps prevent accidental activations from small or unintended touches.

Gesture handling improvements:

  • Added a MINIMUM_DISTANCE threshold (set to 8) and updated the gesture logic to require a minimum movement before activating or failing the swipe gesture, reducing false positives from minor touch movements. (package/src/components/Message/MessageSimple/MessageBubble.tsx) [1] [2]

🎨 UI Changes

iOS
    </tr>
</thead>
<tbody>
    <tr>
        <td>
            <!--<img src="" /> -->
        </td>
        <td>
            <!--<img src="" /> -->
        </td>
    </tr>
</tbody>
Before After:
Android
Before After

🧪 Testing

Tested on Galaxy S22 and Iphone 16

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@sharanya08p sharanya08p marked this pull request as ready for review October 29, 2025 11:25
@sharanya08p sharanya08p changed the title Fix/image tap android Fix image tap functionality on android Oct 29, 2025
@khushal87 khushal87 changed the title Fix image tap functionality on android fix: image tap functionality on android Oct 29, 2025
Copy link
Member

@khushal87 khushal87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @sharanya08p 😄

@khushal87 khushal87 merged commit 97611c8 into GetStream:develop Oct 30, 2025
7 of 10 checks passed
@github-actions github-actions bot mentioned this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants