Ensure unique IDs across all emoji autocompletion types

Change-Id: I522eaf4fb8af214ff9b6a0ac744093cbe6b8b6e4
This commit is contained in:
SpiritCroc 2023-04-07 12:06:03 +02:00
parent cb593ebb14
commit 89750f74a4
1 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class AutocompleteEmojiController @Inject constructor(
private fun buildHeaderItem(header: AutocompleteEmojiDataItem.Header) {
autocompleteHeaderItem {
id(header.id)
id("h/${header.id}")
title(header.title)
}
}
@ -76,7 +76,7 @@ class AutocompleteEmojiController @Inject constructor(
private fun buildEmojiItem(emojiItem: EmojiItem) {
val host = this
autocompleteEmojiItem {
id(emojiItem.name)
id("e/${emojiItem.name}/${emojiItem.mxcUrl}")
emojiItem(emojiItem)
// For caching reasons, we use the AvatarRenderer's thumbnail size here
emoteUrl(
@ -93,7 +93,7 @@ class AutocompleteEmojiController @Inject constructor(
private fun buildExpandItem(item: AutocompleteEmojiDataItem.Expand) {
val host = this
autocompleteExpandItem {
id(item.loadMoreKey + "/" + item.loadMoreKeySecondary)
id("x/${item.loadMoreKey}/${item.loadMoreKeySecondary}")
count(item.count)
onClickListener { host.listener?.onLoadMoreClick(item) }
}