Ensure unique IDs across all emoji autocompletion types
Change-Id: I522eaf4fb8af214ff9b6a0ac744093cbe6b8b6e4
This commit is contained in:
parent
cb593ebb14
commit
89750f74a4
|
@ -68,7 +68,7 @@ class AutocompleteEmojiController @Inject constructor(
|
||||||
|
|
||||||
private fun buildHeaderItem(header: AutocompleteEmojiDataItem.Header) {
|
private fun buildHeaderItem(header: AutocompleteEmojiDataItem.Header) {
|
||||||
autocompleteHeaderItem {
|
autocompleteHeaderItem {
|
||||||
id(header.id)
|
id("h/${header.id}")
|
||||||
title(header.title)
|
title(header.title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ class AutocompleteEmojiController @Inject constructor(
|
||||||
private fun buildEmojiItem(emojiItem: EmojiItem) {
|
private fun buildEmojiItem(emojiItem: EmojiItem) {
|
||||||
val host = this
|
val host = this
|
||||||
autocompleteEmojiItem {
|
autocompleteEmojiItem {
|
||||||
id(emojiItem.name)
|
id("e/${emojiItem.name}/${emojiItem.mxcUrl}")
|
||||||
emojiItem(emojiItem)
|
emojiItem(emojiItem)
|
||||||
// For caching reasons, we use the AvatarRenderer's thumbnail size here
|
// For caching reasons, we use the AvatarRenderer's thumbnail size here
|
||||||
emoteUrl(
|
emoteUrl(
|
||||||
|
@ -93,7 +93,7 @@ class AutocompleteEmojiController @Inject constructor(
|
||||||
private fun buildExpandItem(item: AutocompleteEmojiDataItem.Expand) {
|
private fun buildExpandItem(item: AutocompleteEmojiDataItem.Expand) {
|
||||||
val host = this
|
val host = this
|
||||||
autocompleteExpandItem {
|
autocompleteExpandItem {
|
||||||
id(item.loadMoreKey + "/" + item.loadMoreKeySecondary)
|
id("x/${item.loadMoreKey}/${item.loadMoreKeySecondary}")
|
||||||
count(item.count)
|
count(item.count)
|
||||||
onClickListener { host.listener?.onLoadMoreClick(item) }
|
onClickListener { host.listener?.onLoadMoreClick(item) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue