mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-06 05:53:33 +01:00
Fix frowning face emoji-only message detection
Change-Id: I9f1d41406feef32d5b83f73ef5759800981ccfbd
This commit is contained in:
parent
6c5e72a695
commit
6a3d000be5
@ -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…
x
Reference in New Issue
Block a user