Code review / Renamed base item class name

This commit is contained in:
Valere 2019-05-13 16:29:33 +02:00
parent 0c559976d6
commit 73d5110d67
5 changed files with 5 additions and 8 deletions

View File

@ -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<H : AbsMessageItem.Holder> : AEventItemBase<H>() {
abstract class AbsMessageItem<H : AbsMessageItem.Holder> : BaseEventItem<H>() {
abstract val informationData: MessageInformationData

View File

@ -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<H : AEventItemBase.BaseHolder> : VectorEpoxyModel<H>() {
abstract class BaseEventItem<H : BaseEventItem.BaseHolder> : VectorEpoxyModel<H>() {
var avatarStyle: AvatarStyle = Companion.AvatarStyle.SMALL

View File

@ -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<DefaultItem.Holder>() {
abstract class DefaultItem : BaseEventItem<DefaultItem.Holder>() {
@EpoxyAttribute
var text: CharSequence? = null

View File

@ -31,7 +31,7 @@ data class MergedHeaderItem(private val isCollapsed: Boolean,
private val mergeId: String,
private val mergeData: List<Data>,
private val onCollapsedStateChanged: (Boolean) -> Unit
) : AEventItemBase<MergedHeaderItem.Holder>() {
) : BaseEventItem<MergedHeaderItem.Holder>() {
private val distinctMergeData = mergeData.distinctBy { it.userId }

View File

@ -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<NoticeItem.Holder>() {
abstract class NoticeItem : BaseEventItem<NoticeItem.Holder>() {
@EpoxyAttribute
var noticeText: CharSequence? = null