dessalines / thumb-key

A privacy-conscious Android keyboard made for your thumbs
GNU Affero General Public License v3.0
1.05k stars 221 forks source link

Emojis need to press backspace twice to remove #1168

Closed pxeemo closed 10 hours ago

pxeemo commented 2 days ago

Steps to reproduce

  1. Type a emoji
  2. Press the backspace key

Expected behavior

Emojis should remove completely when backspace is pressed

Actual behavior

You'll see emojis become like this when you press backspace key: ���

version of the program

4.0.6

Android version

Android 14

Device

POCO M3

Other details

This commit #1162 changes the backspace behavior to remove only one unicode character, since emojis are two-width unicode character they won't be removed as normal

Acknowledgements

dessalines commented 2 days ago

This was caused by #1162

@gitterrost4 All the other keyboards must have this issue then also, unless they have exceptions for certain characters.

gitterrost4 commented 2 days ago

I will take a look at it and get it fixed asap.

gitterrost4 commented 2 days ago

I have it fixed. My bad. I didn't think about emoji. In later API-Versions this code could be simplified by using deleteSurroundingTextInCodePoints, but in the minimum required API, this is not yet present.

KraXen72 commented 1 day ago

experiencing the same issue. hopefully a fix can be pushed soon. thanks!