mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Update emoji search to handle aliases with underscores
This commit is contained in:
parent
6144d3ca47
commit
02388e7388
@ -663,8 +663,11 @@ fun EmojiGrid(
|
||||
var emojiList = listOf(CategoryItem("Recent")) + recentEmojis.map { EmojiItemItem(it) } + categorizedEmojis
|
||||
|
||||
if(isSearching) {
|
||||
emojiList = emojiList.filterIsInstance<EmojiItemItem>().searchMultiple(searchFilter) {
|
||||
listOf(it.emoji.description) + it.emoji.aliases + it.emoji.tags
|
||||
emojiList = emojiList.filterIsInstance<EmojiItemItem>().searchMultiple(searchFilter) { item ->
|
||||
listOf(item.emoji.description) +
|
||||
item.emoji.aliases.map { it.replace("_", " ") } +
|
||||
item.emoji.tags +
|
||||
item.emoji.aliases.filter { it.contains("_") }.flatMap { it.split("_") }
|
||||
}.take(30)
|
||||
|
||||
if(emojiList.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user