mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Naming convention: Epoxy item classes have Item
suffix
This commit is contained in:
parent
24fe677e50
commit
e282380ab8
@ -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
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
@ -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()
|
||||
}
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user