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

How to include edit message feature? #605

Open
bs-vinay-parmar opened this issue Jun 4, 2024 · 1 comment
Open

How to include edit message feature? #605

bs-vinay-parmar opened this issue Jun 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@bs-vinay-parmar
Copy link

onMessageLongPress I am opening a menu with 'edit message' view, on click of that view I have to set message to textinput and let user to edit the message and, then onSend I have to call according socket with check of messageId.
If messageId is there hit 'editMessage' else hit 'sendMessage'

Please help me, how can I achieve that?

@bs-vinay-parmar bs-vinay-parmar added the question Further information is requested label Jun 4, 2024
@demchenkoalex
Copy link
Member

Hey! Menu on long press will have to be custom made, there is no support for that atm. To set the message you can use textEditingController that is available in the inputOptions. I guess you can save some state that you're in the editing mode as well, so when you do onSend you would update the existing message and not send a new one. If you would want some indicator about what message is being editing with an option to exit editing mode, check out this answer that should give you and idea how to implement some kind of a placeholder on top of the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants