mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-21 06:39:09 +00:00
ugh oops
This commit is contained in:
parent
fed79abe26
commit
3776a0829e
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ fun getFullEmojiAtEnd(text: CharSequence): String {
|
||||||
while (offset > 0) {
|
while (offset > 0) {
|
||||||
val codepoint = s.codePointBefore(offset)
|
val codepoint = s.codePointBefore(offset)
|
||||||
// stop if codepoint can't be emoji
|
// stop if codepoint can't be emoji
|
||||||
|
if (!mightBeEmoji(codepoint)) return text.substring(offset)
|
||||||
offset -= Character.charCount(codepoint)
|
offset -= Character.charCount(codepoint)
|
||||||
if (offset > 0 && s[offset - 1].code == KeyCode.ZWJ) {
|
if (offset > 0 && s[offset - 1].code == KeyCode.ZWJ) {
|
||||||
// todo: this appends ZWJ in weird cases like text, ZWJ, emoji
|
// todo: this appends ZWJ in weird cases like text, ZWJ, emoji
|
||||||
|
|
Loading…
Add table
Reference in a new issue