From 0250f61d10d4a0cb0963d35556d9ae322788d29c Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 26 Apr 2022 15:48:34 +0200 Subject: [PATCH] Replaces izPublic with isPublic --- .../home/room/list/RoomSummaryItem.kt | 68 ++++++++++++++----- .../home/room/list/RoomSummaryItemFactory.kt | 2 +- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt index 70c5846646..e5a4e374c9 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt @@ -45,24 +45,56 @@ import org.matrix.android.sdk.api.util.MatrixItem @EpoxyModelClass(layout = R.layout.item_room) abstract class RoomSummaryItem : VectorEpoxyModel() { - @EpoxyAttribute lateinit var typingMessage: String - @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer - @EpoxyAttribute lateinit var matrixItem: MatrixItem + @EpoxyAttribute + lateinit var typingMessage: String - @EpoxyAttribute lateinit var lastFormattedEvent: EpoxyCharSequence - @EpoxyAttribute lateinit var lastEventTime: String - @EpoxyAttribute var encryptionTrustLevel: RoomEncryptionTrustLevel? = null - @EpoxyAttribute var userPresence: UserPresence? = null - @EpoxyAttribute var showPresence: Boolean = false - @EpoxyAttribute var izPublic: Boolean = false - @EpoxyAttribute var unreadNotificationCount: Int = 0 - @EpoxyAttribute var hasUnreadMessage: Boolean = false - @EpoxyAttribute var hasDraft: Boolean = false - @EpoxyAttribute var showHighlighted: Boolean = false - @EpoxyAttribute var hasFailedSending: Boolean = false - @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var itemLongClickListener: View.OnLongClickListener? = null - @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var itemClickListener: ClickListener? = null - @EpoxyAttribute var showSelected: Boolean = false + @EpoxyAttribute + lateinit var avatarRenderer: AvatarRenderer + + @EpoxyAttribute + lateinit var matrixItem: MatrixItem + + @EpoxyAttribute + lateinit var lastFormattedEvent: EpoxyCharSequence + + @EpoxyAttribute + lateinit var lastEventTime: String + + @EpoxyAttribute + var encryptionTrustLevel: RoomEncryptionTrustLevel? = null + + @EpoxyAttribute + var userPresence: UserPresence? = null + + @EpoxyAttribute + var showPresence: Boolean = false + + @EpoxyAttribute @JvmField + var isPublic: Boolean = false + + @EpoxyAttribute + var unreadNotificationCount: Int = 0 + + @EpoxyAttribute + var hasUnreadMessage: Boolean = false + + @EpoxyAttribute + var hasDraft: Boolean = false + + @EpoxyAttribute + var showHighlighted: Boolean = false + + @EpoxyAttribute + var hasFailedSending: Boolean = false + + @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) + var itemLongClickListener: View.OnLongClickListener? = null + + @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) + var itemClickListener: ClickListener? = null + + @EpoxyAttribute + var showSelected: Boolean = false override fun bind(holder: Holder) { super.bind(holder) @@ -79,7 +111,7 @@ abstract class RoomSummaryItem : VectorEpoxyModel() { holder.draftView.isVisible = hasDraft avatarRenderer.render(matrixItem, holder.avatarImageView) holder.roomAvatarDecorationImageView.render(encryptionTrustLevel) - holder.roomAvatarPublicDecorationImageView.isVisible = izPublic + holder.roomAvatarPublicDecorationImageView.isVisible = isPublic holder.roomAvatarFailSendingImageView.isVisible = hasFailedSending renderSelection(holder, showSelected) holder.typingView.setTextOrHide(typingMessage) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemFactory.kt index 6326d9c97a..cd3a8b0890 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemFactory.kt @@ -124,7 +124,7 @@ class RoomSummaryItemFactory @Inject constructor(private val displayableEventFor .avatarRenderer(avatarRenderer) // We do not display shield in the room list anymore // .encryptionTrustLevel(roomSummary.roomEncryptionTrustLevel) - .izPublic(roomSummary.isPublic) + .isPublic(roomSummary.isPublic) .showPresence(roomSummary.isDirect) .userPresence(roomSummary.directUserPresence) .matrixItem(roomSummary.toMatrixItem())