Fix Emoji test
This commit is contained in:
parent
746a7fbf37
commit
4fefecd0d9
2 changed files with 19 additions and 15 deletions
|
|
@ -22,7 +22,10 @@ import io.element.android.features.messages.impl.timeline.model.event.AN_EMOJI_O
|
|||
fun String.containsOnlyEmojis(): Boolean {
|
||||
if (LocalInspectionMode.current) return this == AN_EMOJI_ONLY_TEXT
|
||||
if (isEmpty()) return false
|
||||
return containsOnlyEmojisInternal()
|
||||
}
|
||||
|
||||
internal fun String.containsOnlyEmojisInternal(): Boolean {
|
||||
val matcher = GraphemeMatcher(this)
|
||||
var m: GraphemeMatchResult? = null
|
||||
var contiguous = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue