From f29e14fdd815b4b74759aab8a071afaa57ce7bc5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 13 Dec 2021 21:17:14 +0100 Subject: [PATCH] Rename class --- .../app/features/home/room/detail/timeline/item/PollItem.kt | 6 +++--- .../timeline/item/{PollOptionItem.kt => PollOptionView.kt} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/{PollOptionItem.kt => PollOptionView.kt} (98%) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt index 0db1585c45..013e3e4774 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt @@ -58,8 +58,8 @@ abstract class PollItem : AbsMessageItem() { holder.questionTextView.text = pollQuestion holder.totalVotesTextView.text = totalVotesText - val cachedViews = mutableMapOf() - holder.optionsContainer.children.filterIsInstance().forEach { existingPollItemView -> + val cachedViews = mutableMapOf() + holder.optionsContainer.children.filterIsInstance().forEach { existingPollItemView -> cachedViews[existingPollItemView.getTag(STUB_ID)?.toString() ?: ""] = existingPollItemView } @@ -68,7 +68,7 @@ abstract class PollItem : AbsMessageItem() { optionViewStates?.forEachIndexed { index, option -> val tag = relatedEventId + option.optionId - val pollOptionItem: PollOptionItem = (cachedViews[tag] ?: PollOptionItem(holder.view.context)) + val pollOptionItem: PollOptionView = (cachedViews[tag] ?: PollOptionView(holder.view.context)) .apply { setTag(STUB_ID, tag) render( diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionView.kt similarity index 98% rename from vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionItem.kt rename to vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionView.kt index 5893821e4c..2af445041b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollOptionView.kt @@ -26,7 +26,7 @@ import im.vector.app.R import im.vector.app.core.extensions.setAttributeTintedImageResource import im.vector.app.databinding.ItemPollOptionBinding -class PollOptionItem @JvmOverloads constructor( +class PollOptionView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0