(Fix #1543) Fixed the bug where tapping the send button while inline text prediction has uncommitted text messes up the message #1692
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the title says, this bug has existed since Apple launched the inline text prediction and as a long term Telegram user, it used to drive me insane and even forced me to switch to a different app. Finally got some time to fix this issue and will probably shift back to Telegram.
Issue link: #1543
Screen.Recording.2025-02-24.at.1.56.59.AM.mov
Screen.Recording.2025-02-24.at.2.08.56.AM.mp4
Note: While this fixes the bug for the text field in the chat, it does not fix the same problem in the caption text field when an attachment is added. That legacy code is completely in obj-c and I don't really understand it much.