Rename class

This commit is contained in:
Benoit Marty 2021-12-13 21:17:14 +01:00
parent da407ef8a2
commit f29e14fdd8
2 changed files with 4 additions and 4 deletions

View file

@ -58,8 +58,8 @@ abstract class PollItem : AbsMessageItem<PollItem.Holder>() {
holder.questionTextView.text = pollQuestion
holder.totalVotesTextView.text = totalVotesText
val cachedViews = mutableMapOf<String, PollOptionItem>()
holder.optionsContainer.children.filterIsInstance<PollOptionItem>().forEach { existingPollItemView ->
val cachedViews = mutableMapOf<String, PollOptionView>()
holder.optionsContainer.children.filterIsInstance<PollOptionView>().forEach { existingPollItemView ->
cachedViews[existingPollItemView.getTag(STUB_ID)?.toString() ?: ""] = existingPollItemView
}
@ -68,7 +68,7 @@ abstract class PollItem : AbsMessageItem<PollItem.Holder>() {
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(

View file

@ -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