Skip to content

Provide additionalInfo to onLongPressProp #3065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

deiay
Copy link

@deiay deiay commented Apr 26, 2025

🎯 Goal

I noticed my custom onLongPressProp wasn't receiving additionalnfo about the press (e.g. specific thumbnail that was long pressed). I want to be able to take action based off the specific thumbnail that was long pressed in my custom onLongPress function. To do this I need access to the additional info objet.

🛠 Implementation details

This change passes the additionalInfo object to prop onLongPress functions.

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ 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

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.

Hey @deiay, thanks a lot for the PR. There's one thing that has to be taken care of in the PR, and that is the type of the parameter of the onLongPress should be MessagePressableHandlerPayload, same as the onPress, and then you can just add the key as additionalInfo: payload.additionalInfo to the onLongPressArgs object. Currently, this doesn't look correct to me. Let me know if you are not able to figure it out. In that case, I can take it up.

Also, please run the lint checks using yarn lint-fix and build using yarn build so that we don't miss any issues.

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