I’m trying to recreate a custom message action sheet similar to what’s shown in the attached screenshot. I’m using
const { setMessageToEdit, setMessageToReply, messageToReply } = useContext(GroupChannelContexts.Fragment)
to set up actions on long press for “Edit” and “Reply.” When I press on Reply
for example, I call setMessageToReply(msg)
- However, I’m running into an issue where messageToReply
doesn’t seem to update correctly when I pass in the selected message via onLongPress to my custom action sheet.
Additionally, I’m encountering a problem with fetching the channel’s message list. I’m using
const { messages, sendUserMessage, sendFileMessage } = useGroupChannelMessages(sdk, channel);
to get messages, but all messages have parentMessageId set to 0, even for those that are replies.
Questions:
-
How can I ensure that messageToReply updates correctly when using a custom action sheet?
-
Is there a way to retrieve the correct parentMessageId for reply messages using useGroupChannelMessages?
Any guidance on these issues would be greatly appreciated!