mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
Ensure there is never twice the same emoji
This commit is contained in:
parent
8b4c51139d
commit
9e73e95f55
1 changed files with 3 additions and 2 deletions
|
@ -37,7 +37,7 @@ class EmojiDataSource @Inject constructor(
|
|||
fun filterWith(query: String): List<EmojiItem> {
|
||||
val words = query.split("\\s".toRegex())
|
||||
|
||||
return rawData.emojis.values
|
||||
return (rawData.emojis.values
|
||||
.filter { emojiItem ->
|
||||
emojiItem.name.contains(query, true)
|
||||
}
|
||||
|
@ -48,7 +48,8 @@ class EmojiDataSource @Inject constructor(
|
|||
prev && emojiItem.keywords.any { keyword -> keyword.contains(word, true) }
|
||||
})
|
||||
}
|
||||
.sortedBy { it.name }
|
||||
.sortedBy { it.name })
|
||||
.distinct()
|
||||
}
|
||||
|
||||
fun getQuickReactions(): List<EmojiItem> {
|
||||
|
|
Loading…
Reference in a new issue