mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 13:00:18 +03:00
Rename class
This commit is contained in:
parent
da407ef8a2
commit
f29e14fdd8
2 changed files with 4 additions and 4 deletions
|
@ -58,8 +58,8 @@ abstract class PollItem : AbsMessageItem<PollItem.Holder>() {
|
||||||
holder.questionTextView.text = pollQuestion
|
holder.questionTextView.text = pollQuestion
|
||||||
holder.totalVotesTextView.text = totalVotesText
|
holder.totalVotesTextView.text = totalVotesText
|
||||||
|
|
||||||
val cachedViews = mutableMapOf<String, PollOptionItem>()
|
val cachedViews = mutableMapOf<String, PollOptionView>()
|
||||||
holder.optionsContainer.children.filterIsInstance<PollOptionItem>().forEach { existingPollItemView ->
|
holder.optionsContainer.children.filterIsInstance<PollOptionView>().forEach { existingPollItemView ->
|
||||||
cachedViews[existingPollItemView.getTag(STUB_ID)?.toString() ?: ""] = existingPollItemView
|
cachedViews[existingPollItemView.getTag(STUB_ID)?.toString() ?: ""] = existingPollItemView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ abstract class PollItem : AbsMessageItem<PollItem.Holder>() {
|
||||||
optionViewStates?.forEachIndexed { index, option ->
|
optionViewStates?.forEachIndexed { index, option ->
|
||||||
val tag = relatedEventId + option.optionId
|
val tag = relatedEventId + option.optionId
|
||||||
|
|
||||||
val pollOptionItem: PollOptionItem = (cachedViews[tag] ?: PollOptionItem(holder.view.context))
|
val pollOptionItem: PollOptionView = (cachedViews[tag] ?: PollOptionView(holder.view.context))
|
||||||
.apply {
|
.apply {
|
||||||
setTag(STUB_ID, tag)
|
setTag(STUB_ID, tag)
|
||||||
render(
|
render(
|
||||||
|
|
|
@ -26,7 +26,7 @@ import im.vector.app.R
|
||||||
import im.vector.app.core.extensions.setAttributeTintedImageResource
|
import im.vector.app.core.extensions.setAttributeTintedImageResource
|
||||||
import im.vector.app.databinding.ItemPollOptionBinding
|
import im.vector.app.databinding.ItemPollOptionBinding
|
||||||
|
|
||||||
class PollOptionItem @JvmOverloads constructor(
|
class PollOptionView @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyleAttr: Int = 0
|
defStyleAttr: Int = 0
|
Loading…
Add table
Reference in a new issue