Skip to content
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

Better type than any for context in onPress and onLongPress handlers. #2509

Open
xdumaine opened this issue Jul 15, 2024 · 5 comments
Open

Comments

@xdumaine
Copy link

Issue Description

Would love a better type than any for context in onPress and onLongPress handlers.

as is, context.showActionSheetWithOptions(...) doesn't have any typing.

@xdumaine
Copy link
Author

Looks like the better type is IGiftedChatContext but it's not an easy type swap due to some internals of how it's passed around and used on TouchableOpacity events.

@Varryme
Copy link

Varryme commented Aug 13, 2024

I see it

@Varryme
Copy link

Varryme commented Aug 13, 2024

Is it mine

@xdumaine
Copy link
Author

Related: the onPressAvatar doesn't get this param at all, as far as I can tell. It'd be useful (for action sheet). Using this doesn't work for me, weirdly it silently fails:

const { actionSheet } = useChatContext()

const onPressAvatar = useCallback((user: User) => {
  actionSheet().showActionSheetWithOptions(...) // Fails - no error, nothing shown
}, [...]);

onLongPress = useCallback((context: IGiftedChatContext, msg: IMessage) => {
  context.actionSheet().showActionSheetWithOptions(...) // works!
}, [...]);

@Varryme
Copy link

Varryme commented Aug 25, 2024

These items are totally false and being made up. I did not do that and I'm not about to be bending down to your wheel on it. Go see the powers that be there much more powerful in this run GitHub and all the other system. They have running through there they've been failing and you know what you like to get a reaction to me but you're not getting a reaction have a seat Teca LinkedIn court go B2B whatever it is make yourself better. Go get a therapist. Fuck you, Reed and do what the fuck you're gonna do things are not that bad just like Lynn LinkedIn told me when I got attacked now go make it better. I'm not paying anything. I'm not having anything fixed that was degrading. I can't even get out of any of these developers hate each other and they hate me

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

No branches or pull requests

2 participants