Open xdumaine opened 1 month ago
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.
I see it
Is it mine
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!
}, [...]);
Issue Description
Would love a better type than
any
forcontext
inonPress
andonLongPress
handlers.as is,
context.showActionSheetWithOptions(...)
doesn't have any typing.