mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Fix frowning face emoji-only message detection
Change-Id: I9f1d41406feef32d5b83f73ef5759800981ccfbd
This commit is contained in:
parent
6c5e72a695
commit
6a3d000be5
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ fun containsOnlyEmojis(str: String?): Boolean {
|
|||
// Now rely on vanniktech library
|
||||
// Emojis sent from desktop such as thumbs-up or down are sent with a variant selection symbol "\ufe0f",
|
||||
// that the library identifies as non-emoji character, so remove that manually before.
|
||||
return str?.replace("\ufe0f", "").isOnlyEmojis()
|
||||
// However, use the old check as well since the "white frowning face" emoji gets lost otherwise...?
|
||||
return str.isOnlyEmojis() || str?.replace("\ufe0f", "").isOnlyEmojis()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue