From 78e01093018075234618cbb377fc3a4f3b0d8aee Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Nov 2021 16:39:20 +0100 Subject: [PATCH] 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 --- .../im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt | 1 + .../core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt index e6451b34ef..0af342641e 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt @@ -32,6 +32,7 @@ abstract class ProfileMatrixItem : BaseProfileMatrixItem(R.id.matrixItemTitle) val subtitleView by bind(R.id.matrixItemSubtitle) + val powerLabel by bind(R.id.matrixItemPowerLevelLabel) val presenceImageView by bind(R.id.matrixItemPresenceImageView) val avatarImageView by bind(R.id.matrixItemAvatar) val avatarDecorationImageView by bind(R.id.matrixItemAvatarDecoration) diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt index b7fd597789..12189dc8f4 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt @@ -17,7 +17,6 @@ package im.vector.app.core.epoxy.profiles -import android.widget.TextView import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass @@ -25,7 +24,7 @@ import im.vector.app.R import im.vector.app.core.extensions.setTextOrHide @EpoxyModelClass(layout = R.layout.item_profile_matrix_item) -abstract class ProfileMatrixItemWithPowerLevel : BaseProfileMatrixItem() { +abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() { @EpoxyAttribute var powerLevelLabel: CharSequence? = null @@ -34,8 +33,4 @@ abstract class ProfileMatrixItemWithPowerLevel : BaseProfileMatrixItem(R.id.matrixItemPowerLevelLabel) - } }