diff --git a/vector/src/main/java/im/vector/riotx/features/reactions/data/EmojiDataSource.kt b/vector/src/main/java/im/vector/riotx/features/reactions/data/EmojiDataSource.kt index 873ab90254..8abea21667 100644 --- a/vector/src/main/java/im/vector/riotx/features/reactions/data/EmojiDataSource.kt +++ b/vector/src/main/java/im/vector/riotx/features/reactions/data/EmojiDataSource.kt @@ -37,7 +37,7 @@ class EmojiDataSource @Inject constructor( fun filterWith(query: String): List { 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 {