Fix crash when filtering the room member list
A Holder as to be uniquely linked to the layout id declared in @EpoxyModelClass, see https://github.com/airbnb/epoxy/issues/854 Fixes https://github.com/matrix-org/element-android-rageshakes/issues/27784
This commit is contained in:
parent
21e1766e3e
commit
78e0109301
@ -32,6 +32,7 @@ abstract class ProfileMatrixItem : BaseProfileMatrixItem<ProfileMatrixItem.Holde
|
|||||||
open class Holder : VectorEpoxyHolder() {
|
open class Holder : VectorEpoxyHolder() {
|
||||||
val titleView by bind<TextView>(R.id.matrixItemTitle)
|
val titleView by bind<TextView>(R.id.matrixItemTitle)
|
||||||
val subtitleView by bind<TextView>(R.id.matrixItemSubtitle)
|
val subtitleView by bind<TextView>(R.id.matrixItemSubtitle)
|
||||||
|
val powerLabel by bind<TextView>(R.id.matrixItemPowerLevelLabel)
|
||||||
val presenceImageView by bind<PresenceStateImageView>(R.id.matrixItemPresenceImageView)
|
val presenceImageView by bind<PresenceStateImageView>(R.id.matrixItemPresenceImageView)
|
||||||
val avatarImageView by bind<ImageView>(R.id.matrixItemAvatar)
|
val avatarImageView by bind<ImageView>(R.id.matrixItemAvatar)
|
||||||
val avatarDecorationImageView by bind<ShieldImageView>(R.id.matrixItemAvatarDecoration)
|
val avatarDecorationImageView by bind<ShieldImageView>(R.id.matrixItemAvatarDecoration)
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package im.vector.app.core.epoxy.profiles
|
package im.vector.app.core.epoxy.profiles
|
||||||
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.airbnb.epoxy.EpoxyAttribute
|
import com.airbnb.epoxy.EpoxyAttribute
|
||||||
import com.airbnb.epoxy.EpoxyModelClass
|
import com.airbnb.epoxy.EpoxyModelClass
|
||||||
@ -25,7 +24,7 @@ import im.vector.app.R
|
|||||||
import im.vector.app.core.extensions.setTextOrHide
|
import im.vector.app.core.extensions.setTextOrHide
|
||||||
|
|
||||||
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item)
|
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item)
|
||||||
abstract class ProfileMatrixItemWithPowerLevel : BaseProfileMatrixItem<ProfileMatrixItemWithPowerLevel.Holder>() {
|
abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() {
|
||||||
|
|
||||||
@EpoxyAttribute var powerLevelLabel: CharSequence? = null
|
@EpoxyAttribute var powerLevelLabel: CharSequence? = null
|
||||||
|
|
||||||
@ -34,8 +33,4 @@ abstract class ProfileMatrixItemWithPowerLevel : BaseProfileMatrixItem<ProfileMa
|
|||||||
holder.editableView.isVisible = false
|
holder.editableView.isVisible = false
|
||||||
holder.powerLabel.setTextOrHide(powerLevelLabel)
|
holder.powerLabel.setTextOrHide(powerLevelLabel)
|
||||||
}
|
}
|
||||||
|
|
||||||
class Holder : ProfileMatrixItem.Holder() {
|
|
||||||
val powerLabel by bind<TextView>(R.id.matrixItemPowerLevelLabel)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user