From 89750f74a4af832e4e768aeafda729b11308e426 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Fri, 7 Apr 2023 12:06:03 +0200 Subject: [PATCH] Ensure unique IDs across all emoji autocompletion types Change-Id: I522eaf4fb8af214ff9b6a0ac744093cbe6b8b6e4 --- .../autocomplete/emoji/AutocompleteEmojiController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiController.kt b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiController.kt index 1cb120f4cf..be4a2d4449 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiController.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiController.kt @@ -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) } }