Naming convention: Epoxy item classes have Itemsuffix

This commit is contained in:
Benoit Marty 2022-10-03 16:42:44 +02:00 committed by Benoit Marty
parent 24fe677e50
commit e282380ab8
8 changed files with 11 additions and 11 deletions

View File

@ -41,7 +41,7 @@ import org.matrix.android.sdk.api.session.presence.model.UserPresence
import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass
abstract class RoomSummaryItemCentered : VectorEpoxyModel<RoomSummaryItemCentered.Holder>(R.layout.item_room_centered) {
abstract class RoomSummaryCenteredItem : VectorEpoxyModel<RoomSummaryCenteredItem.Holder>(R.layout.item_room_centered) {
@EpoxyAttribute
lateinit var avatarRenderer: AvatarRenderer

View File

@ -191,7 +191,7 @@ class RoomSummaryItemFactory @Inject constructor(
unreadCount: Int,
onClick: ((RoomSummary) -> Unit)?,
onLongClick: ((RoomSummary) -> Boolean)?
) = RoomSummaryItemCentered_()
) = RoomSummaryCenteredItem_()
.id(roomSummary.roomId)
.avatarRenderer(avatarRenderer)
// We do not display shield in the room list anymore

View File

@ -67,7 +67,7 @@ class RoomSummaryPagedController(
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
return if (item == null) {
val host = this
RoomSummaryItemPlaceHolder_().apply {
RoomSummaryPlaceHolderItem_().apply {
id(currentPosition)
useSingleLineForLastEvent(host.shouldUseSingleLine)
}

View File

@ -24,7 +24,7 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass
abstract class RoomSummaryItemPlaceHolder : VectorEpoxyModel<RoomSummaryItemPlaceHolder.Holder>(R.layout.item_room_placeholder) {
abstract class RoomSummaryPlaceHolderItem : VectorEpoxyModel<RoomSummaryPlaceHolderItem.Holder>(R.layout.item_room_placeholder) {
@EpoxyAttribute
var useSingleLineForLastEvent: Boolean = false

View File

@ -22,6 +22,6 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass
abstract class SpaceDirectoryFilterNoResults : VectorEpoxyModel<SpaceDirectoryFilterNoResults.Holder>(R.layout.item_space_directory_filter_no_results) {
abstract class SpaceDirectoryFilterNoResultsItem : VectorEpoxyModel<SpaceDirectoryFilterNoResultsItem.Holder>(R.layout.item_space_directory_filter_no_results) {
class Holder : VectorEpoxyHolder()
}

View File

@ -24,7 +24,7 @@ import im.vector.app.core.utils.createUIHandler
import im.vector.app.features.home.RoomListDisplayMode
import im.vector.app.features.home.room.list.RoomListListener
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
import im.vector.app.features.home.room.list.RoomSummaryItemPlaceHolder_
import im.vector.app.features.home.room.list.RoomSummaryPlaceHolderItem_
import im.vector.app.features.settings.FontScalePreferences
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
import org.matrix.android.sdk.api.session.room.model.RoomSummary
@ -83,7 +83,7 @@ class HomeFilteredRoomsController @Inject constructor(
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
return if (item == null) {
val host = this
RoomSummaryItemPlaceHolder_().apply {
RoomSummaryPlaceHolderItem_().apply {
id(currentPosition)
useSingleLineForLastEvent(host.shouldUseSingleLine)
}

View File

@ -22,7 +22,7 @@ import im.vector.app.core.utils.createUIHandler
import im.vector.app.features.home.RoomListDisplayMode
import im.vector.app.features.home.room.list.RoomListListener
import im.vector.app.features.home.room.list.RoomSummaryItemFactory
import im.vector.app.features.home.room.list.RoomSummaryItemPlaceHolder_
import im.vector.app.features.home.room.list.RoomSummaryPlaceHolderItem_
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import javax.inject.Inject
@ -43,7 +43,7 @@ class InvitesController @Inject constructor(
var listener: RoomListListener? = null
override fun buildItemModel(currentPosition: Int, item: RoomSummary?): EpoxyModel<*> {
item ?: return RoomSummaryItemPlaceHolder_().apply { id(currentPosition) }
item ?: return RoomSummaryPlaceHolderItem_().apply { id(currentPosition) }
return roomSummaryItemFactory.create(item, roomChangeMembershipStates.orEmpty(), emptySet(), RoomListDisplayMode.ROOMS, listener)
}
}

View File

@ -34,7 +34,7 @@ import im.vector.app.core.ui.list.genericEmptyWithActionItem
import im.vector.app.core.ui.list.genericPillItem
import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.home.room.list.spaceChildInfoItem
import im.vector.app.features.home.room.list.spaceDirectoryFilterNoResults
import im.vector.app.features.home.room.list.spaceDirectoryFilterNoResultsItem
import im.vector.app.features.spaces.manage.SpaceChildInfoMatchFilter
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
import me.gujun.android.span.span
@ -141,7 +141,7 @@ class SpaceDirectoryController @Inject constructor(
val filteredChildInfo = flattenChildInfo.filter { matchFilter.test(it) }
if (filteredChildInfo.isEmpty()) {
spaceDirectoryFilterNoResults {
spaceDirectoryFilterNoResultsItem {
id("no_results")
}
} else {