mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-11 18:57:44 +03:00
Fix detection of some emojis for emoji-only messages
Change-Id: Ie22d90c39091a85736260672db7413fdfd45f7c4
This commit is contained in:
parent
1bd59e3c1c
commit
4248ec163f
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ import com.vanniktech.emoji.EmojiUtils
|
|||
*/
|
||||
fun containsOnlyEmojis(str: String?): Boolean {
|
||||
// Now rely on vanniktech library
|
||||
return EmojiUtils.isOnlyEmojis(str)
|
||||
// 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 EmojiUtils.isOnlyEmojis(str?.replace("\ufe0f", ""))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue