From 73d5110d67bfd725f078348732542f39ca1e43dd Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 13 May 2019 16:29:33 +0200 Subject: [PATCH] Code review / Renamed base item class name --- .../home/room/detail/timeline/item/AbsMessageItem.kt | 5 +---- .../timeline/item/{AEventItemBase.kt => BaseEventItem.kt} | 2 +- .../features/home/room/detail/timeline/item/DefaultItem.kt | 2 +- .../home/room/detail/timeline/item/MergedHeaderItem.kt | 2 +- .../features/home/room/detail/timeline/item/NoticeItem.kt | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) rename vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/{AEventItemBase.kt => BaseEventItem.kt} (96%) diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AbsMessageItem.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AbsMessageItem.kt index 3f2cfd4b44..5ff41a010e 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -21,13 +21,10 @@ import android.widget.ImageView import android.widget.TextView import im.vector.riotredesign.R import com.airbnb.epoxy.EpoxyAttribute -import com.jakewharton.rxbinding2.view.RxView -import im.vector.riotredesign.core.epoxy.VectorEpoxyHolder -import im.vector.riotredesign.core.epoxy.VectorEpoxyModel import im.vector.riotredesign.features.home.AvatarRenderer -abstract class AbsMessageItem : AEventItemBase() { +abstract class AbsMessageItem : BaseEventItem() { abstract val informationData: MessageInformationData diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AEventItemBase.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/BaseEventItem.kt similarity index 96% rename from vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AEventItemBase.kt rename to vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/BaseEventItem.kt index ad7d55d2cb..7e6a2bc13f 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/AEventItemBase.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/BaseEventItem.kt @@ -25,7 +25,7 @@ import im.vector.riotredesign.R import im.vector.riotredesign.core.epoxy.VectorEpoxyHolder import im.vector.riotredesign.core.epoxy.VectorEpoxyModel -abstract class AEventItemBase : VectorEpoxyModel() { +abstract class BaseEventItem : VectorEpoxyModel() { var avatarStyle: AvatarStyle = Companion.AvatarStyle.SMALL diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/DefaultItem.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/DefaultItem.kt index 5e3594c5bd..3985e8c1d6 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/DefaultItem.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/DefaultItem.kt @@ -22,7 +22,7 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.riotredesign.R @EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class DefaultItem : AEventItemBase() { +abstract class DefaultItem : BaseEventItem() { @EpoxyAttribute var text: CharSequence? = null diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/MergedHeaderItem.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/MergedHeaderItem.kt index 227b0e1d76..6cdd7e15e1 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/MergedHeaderItem.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/MergedHeaderItem.kt @@ -31,7 +31,7 @@ data class MergedHeaderItem(private val isCollapsed: Boolean, private val mergeId: String, private val mergeData: List, private val onCollapsedStateChanged: (Boolean) -> Unit -) : AEventItemBase() { +) : BaseEventItem() { private val distinctMergeData = mergeData.distinctBy { it.userId } diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/NoticeItem.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/NoticeItem.kt index a16ac25442..dd06cb0cae 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/NoticeItem.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/item/NoticeItem.kt @@ -25,7 +25,7 @@ import im.vector.riotredesign.R import im.vector.riotredesign.features.home.AvatarRenderer @EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class NoticeItem : AEventItemBase() { +abstract class NoticeItem : BaseEventItem() { @EpoxyAttribute var noticeText: CharSequence? = null