replacing epoxy item annotation layout references with getDefaultLayoutId override

This commit is contained in:
Adam Brown 2022-06-29 17:21:05 +01:00
parent abea68557b
commit 33ca5753f1
173 changed files with 388 additions and 363 deletions

View File

@ -29,7 +29,7 @@ import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
@EpoxyModelClass(layout = R2.layout.item_jv_base_value) @EpoxyModelClass
internal abstract class ValueItem : EpoxyModelWithHolder<ValueItem.Holder>() { internal abstract class ValueItem : EpoxyModelWithHolder<ValueItem.Holder>() {
@EpoxyAttribute @EpoxyAttribute
@ -44,6 +44,8 @@ internal abstract class ValueItem : EpoxyModelWithHolder<ValueItem.Holder>() {
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickListener: View.OnClickListener? = null var itemClickListener: View.OnClickListener? = null
override fun getDefaultLayout() = R.layout.item_jv_base_value
override fun bind(holder: Holder) { override fun bind(holder: Holder) {
super.bind(holder) super.bind(holder)
holder.textView.text = text?.charSequence holder.textView.text = text?.charSequence

View File

@ -23,11 +23,12 @@ import android.widget.Spinner
import android.widget.TextView import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = im.vector.app.R.layout.item_feature) @EpoxyModelClass
abstract class BooleanFeatureItem : VectorEpoxyModel<BooleanFeatureItem.Holder>() { abstract class BooleanFeatureItem : VectorEpoxyModel<BooleanFeatureItem.Holder>(R.layout.item_feature) {
@EpoxyAttribute @EpoxyAttribute
lateinit var feature: Feature.BooleanFeature lateinit var feature: Feature.BooleanFeature

View File

@ -23,11 +23,12 @@ import android.widget.Spinner
import android.widget.TextView import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = im.vector.app.R.layout.item_feature) @EpoxyModelClass
abstract class EnumFeatureItem : VectorEpoxyModel<EnumFeatureItem.Holder>() { abstract class EnumFeatureItem : VectorEpoxyModel<EnumFeatureItem.Holder>(R.layout.item_feature) {
@EpoxyAttribute @EpoxyAttribute
lateinit var feature: Feature.EnumFeature<*> lateinit var feature: Feature.EnumFeature<*>

View File

@ -21,14 +21,15 @@ import android.widget.TextView
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
import me.gujun.android.span.image import me.gujun.android.span.image
import me.gujun.android.span.span import me.gujun.android.span.span
import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentation import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentation
@EpoxyModelClass(layout = im.vector.app.R.layout.item_sas_emoji) @EpoxyModelClass
abstract class SasEmojiItem : VectorEpoxyModel<SasEmojiItem.Holder>() { abstract class SasEmojiItem : VectorEpoxyModel<SasEmojiItem.Holder>(R.layout.item_sas_emoji) {
@EpoxyAttribute @EpoxyAttribute
var index: Int = 0 var index: Int = 0
@ -51,9 +52,9 @@ abstract class SasEmojiItem : VectorEpoxyModel<SasEmojiItem.Holder>() {
} }
class Holder : VectorEpoxyHolder() { class Holder : VectorEpoxyHolder() {
val indexView by bind<TextView>(im.vector.app.R.id.sas_emoji_index) val indexView by bind<TextView>(R.id.sas_emoji_index)
val emojiView by bind<TextView>(im.vector.app.R.id.sas_emoji) val emojiView by bind<TextView>(R.id.sas_emoji)
val textView by bind<TextView>(im.vector.app.R.id.sas_emoji_text) val textView by bind<TextView>(R.id.sas_emoji_text)
val idView by bind<TextView>(im.vector.app.R.id.sas_emoji_text_id) val idView by bind<TextView>(R.id.sas_emoji_text_id)
} }
} }

View File

@ -18,7 +18,7 @@ package im.vector.app.core.epoxy
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_divider_on_surface) @EpoxyModelClass
abstract class BottomSheetDividerItem : VectorEpoxyModel<BottomSheetDividerItem.Holder>() { abstract class BottomSheetDividerItem : VectorEpoxyModel<BottomSheetDividerItem.Holder>(R.layout.item_divider_on_surface) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -22,8 +22,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import com.google.android.material.checkbox.MaterialCheckBox import com.google.android.material.checkbox.MaterialCheckBox
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_checkbox) @EpoxyModelClass
abstract class CheckBoxItem : VectorEpoxyModel<CheckBoxItem.Holder>() { abstract class CheckBoxItem : VectorEpoxyModel<CheckBoxItem.Holder>(R.layout.item_checkbox) {
@EpoxyAttribute @EpoxyAttribute
var checked: Boolean = false var checked: Boolean = false

View File

@ -18,7 +18,7 @@ package im.vector.app.core.epoxy
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_divider) @EpoxyModelClass
abstract class DividerItem : VectorEpoxyModel<DividerItem.Holder>() { abstract class DividerItem : VectorEpoxyModel<DividerItem.Holder>(R.layout.item_divider) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -23,8 +23,8 @@ import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_error_retry) @EpoxyModelClass
abstract class ErrorWithRetryItem : VectorEpoxyModel<ErrorWithRetryItem.Holder>() { abstract class ErrorWithRetryItem : VectorEpoxyModel<ErrorWithRetryItem.Holder>(R.layout.item_error_retry) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -28,8 +28,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.copyOnLongClick import im.vector.app.core.extensions.copyOnLongClick
@EpoxyModelClass(layout = R.layout.item_expandable_textview) @EpoxyModelClass
abstract class ExpandableTextItem : VectorEpoxyModel<ExpandableTextItem.Holder>() { abstract class ExpandableTextItem : VectorEpoxyModel<ExpandableTextItem.Holder>(R.layout.item_expandable_textview) {
@EpoxyAttribute @EpoxyAttribute
lateinit var content: String lateinit var content: String

View File

@ -21,8 +21,8 @@ import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_help_footer) @EpoxyModelClass
abstract class HelpFooterItem : VectorEpoxyModel<HelpFooterItem.Holder>() { abstract class HelpFooterItem : VectorEpoxyModel<HelpFooterItem.Holder>(R.layout.item_help_footer) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -24,8 +24,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_loading) @EpoxyModelClass
abstract class LoadingItem : VectorEpoxyModel<LoadingItem.Holder>() { abstract class LoadingItem : VectorEpoxyModel<LoadingItem.Holder>(R.layout.item_loading) {
@EpoxyAttribute var loadingText: String? = null @EpoxyAttribute var loadingText: String? = null
@EpoxyAttribute var showLoader: Boolean = true @EpoxyAttribute var showLoader: Boolean = true

View File

@ -21,8 +21,8 @@ import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_no_result) @EpoxyModelClass
abstract class NoResultItem : VectorEpoxyModel<NoResultItem.Holder>() { abstract class NoResultItem : VectorEpoxyModel<NoResultItem.Holder>(R.layout.item_no_result) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -19,8 +19,8 @@ package im.vector.app.core.epoxy
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_loading_square) @EpoxyModelClass
abstract class SquareLoadingItem : VectorEpoxyModel<SquareLoadingItem.Holder>() { abstract class SquareLoadingItem : VectorEpoxyModel<SquareLoadingItem.Holder>(R.layout.item_loading_square) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -22,8 +22,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.features.home.room.detail.timeline.item.ItemWithEvents import im.vector.app.features.home.room.detail.timeline.item.ItemWithEvents
@EpoxyModelClass(layout = R.layout.item_timeline_empty) @EpoxyModelClass
abstract class TimelineEmptyItem : VectorEpoxyModel<TimelineEmptyItem.Holder>(), ItemWithEvents { abstract class TimelineEmptyItem : VectorEpoxyModel<TimelineEmptyItem.Holder>(R.layout.item_timeline_empty), ItemWithEvents {
@EpoxyAttribute lateinit var eventId: String @EpoxyAttribute lateinit var eventId: String
@EpoxyAttribute var notBlank: Boolean = false @EpoxyAttribute var notBlank: Boolean = false

View File

@ -17,6 +17,7 @@
package im.vector.app.core.epoxy package im.vector.app.core.epoxy
import androidx.annotation.CallSuper import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import com.airbnb.epoxy.EpoxyModelWithHolder import com.airbnb.epoxy.EpoxyModelWithHolder
import com.airbnb.epoxy.VisibilityState import com.airbnb.epoxy.VisibilityState
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -27,12 +28,16 @@ import kotlinx.coroutines.cancelChildren
/** /**
* EpoxyModelWithHolder which can listen to visibility state change. * EpoxyModelWithHolder which can listen to visibility state change.
*/ */
abstract class VectorEpoxyModel<H : VectorEpoxyHolder> : EpoxyModelWithHolder<H>() { abstract class VectorEpoxyModel<H : VectorEpoxyHolder>(
@LayoutRes private val layoutId: Int
) : EpoxyModelWithHolder<H>() {
protected val coroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Main) protected val coroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Main)
private var onModelVisibilityStateChangedListener: OnVisibilityStateChangedListener? = null private var onModelVisibilityStateChangedListener: OnVisibilityStateChangedListener? = null
final override fun getDefaultLayout() = layoutId
@CallSuper @CallSuper
override fun bind(holder: H) { override fun bind(holder: H) {
super.bind(holder) super.bind(holder)

View File

@ -23,8 +23,8 @@ import im.vector.app.R
* Item of size (0, 0). * Item of size (0, 0).
* It can be useful to avoid automatic scroll of RecyclerView with Epoxy controller, when the first valuable item changes. * It can be useful to avoid automatic scroll of RecyclerView with Epoxy controller, when the first valuable item changes.
*/ */
@EpoxyModelClass(layout = R.layout.item_zero) @EpoxyModelClass
abstract class ZeroItem : VectorEpoxyModel<ZeroItem.Holder>() { abstract class ZeroItem : VectorEpoxyModel<ZeroItem.Holder>(R.layout.item_zero) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -39,8 +39,8 @@ import im.vector.app.features.themes.ThemeUtils
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_action) @EpoxyModelClass
abstract class BottomSheetActionItem : VectorEpoxyModel<BottomSheetActionItem.Holder>() { abstract class BottomSheetActionItem : VectorEpoxyModel<BottomSheetActionItem.Holder>(R.layout.item_bottom_sheet_action) {
@EpoxyAttribute @EpoxyAttribute
@DrawableRes @DrawableRes

View File

@ -43,8 +43,8 @@ import org.matrix.android.sdk.api.util.MatrixItem
/** /**
* A message preview for bottom sheet. * A message preview for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_message_preview) @EpoxyModelClass
abstract class BottomSheetMessagePreviewItem : VectorEpoxyModel<BottomSheetMessagePreviewItem.Holder>() { abstract class BottomSheetMessagePreviewItem : VectorEpoxyModel<BottomSheetMessagePreviewItem.Holder>(R.layout.item_bottom_sheet_message_preview) {
@EpoxyAttribute @EpoxyAttribute
lateinit var avatarRenderer: AvatarRenderer lateinit var avatarRenderer: AvatarRenderer

View File

@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.onClick
/** /**
* A quick reaction list for bottom sheet. * A quick reaction list for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_quick_reaction) @EpoxyModelClass
abstract class BottomSheetQuickReactionsItem : VectorEpoxyModel<BottomSheetQuickReactionsItem.Holder>() { abstract class BottomSheetQuickReactionsItem : VectorEpoxyModel<BottomSheetQuickReactionsItem.Holder>(R.layout.item_bottom_sheet_quick_reaction) {
@EpoxyAttribute @EpoxyAttribute
lateinit var fontProvider: EmojiCompatFontProvider lateinit var fontProvider: EmojiCompatFontProvider

View File

@ -33,8 +33,8 @@ import im.vector.app.core.extensions.setTextOrHide
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_radio) @EpoxyModelClass
abstract class BottomSheetRadioActionItem : VectorEpoxyModel<BottomSheetRadioActionItem.Holder>() { abstract class BottomSheetRadioActionItem : VectorEpoxyModel<BottomSheetRadioActionItem.Holder>(R.layout.item_bottom_sheet_radio) {
@EpoxyAttribute @EpoxyAttribute
var title: String? = null var title: String? = null

View File

@ -39,8 +39,8 @@ import org.matrix.android.sdk.api.util.MatrixItem
/** /**
* A room preview for bottom sheet. * A room preview for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_room_preview) @EpoxyModelClass
abstract class BottomSheetRoomPreviewItem : VectorEpoxyModel<BottomSheetRoomPreviewItem.Holder>() { abstract class BottomSheetRoomPreviewItem : VectorEpoxyModel<BottomSheetRoomPreviewItem.Holder>(R.layout.item_bottom_sheet_room_preview) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute lateinit var matrixItem: MatrixItem

View File

@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A send state for bottom sheet. * A send state for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_message_status) @EpoxyModelClass
abstract class BottomSheetSendStateItem : VectorEpoxyModel<BottomSheetSendStateItem.Holder>() { abstract class BottomSheetSendStateItem : VectorEpoxyModel<BottomSheetSendStateItem.Holder>(R.layout.item_bottom_sheet_message_status) {
@EpoxyAttribute @EpoxyAttribute
var showProgress: Boolean = false var showProgress: Boolean = false

View File

@ -17,6 +17,7 @@
package im.vector.app.core.epoxy.profiles package im.vector.app.core.epoxy.profiles
import androidx.annotation.CallSuper import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
@ -28,7 +29,7 @@ import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
abstract class BaseProfileMatrixItem<T : ProfileMatrixItem.Holder> : VectorEpoxyModel<T>() { abstract class BaseProfileMatrixItem<T : ProfileMatrixItem.Holder>(@LayoutRes layoutId: Int) : VectorEpoxyModel<T>(layoutId) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var editable: Boolean = true @EpoxyAttribute var editable: Boolean = true

View File

@ -33,8 +33,8 @@ import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_profile_action) @EpoxyModelClass
abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>() { abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>(R.layout.item_profile_action) {
@EpoxyAttribute @EpoxyAttribute
lateinit var title: String lateinit var title: String

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.ui.views.PresenceStateImageView import im.vector.app.core.ui.views.PresenceStateImageView
import im.vector.app.core.ui.views.ShieldImageView import im.vector.app.core.ui.views.ShieldImageView
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) @EpoxyModelClass
abstract class ProfileMatrixItem : BaseProfileMatrixItem<ProfileMatrixItem.Holder>() { abstract class ProfileMatrixItem : BaseProfileMatrixItem<ProfileMatrixItem.Holder>(R.layout.item_profile_matrix_item) {
open class Holder : VectorEpoxyHolder() { open class Holder : VectorEpoxyHolder() {
val titleView by bind<TextView>(R.id.matrixItemTitle) val titleView by bind<TextView>(R.id.matrixItemTitle)

View File

@ -23,7 +23,7 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) @EpoxyModelClass
abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() { abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() {
@EpoxyAttribute var ignoredUser: Boolean = false @EpoxyAttribute var ignoredUser: Boolean = false

View File

@ -22,7 +22,7 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import org.matrix.android.sdk.api.session.presence.model.UserPresence import org.matrix.android.sdk.api.session.presence.model.UserPresence
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) @EpoxyModelClass
abstract class ProfileMatrixItemWithPowerLevelWithPresence : ProfileMatrixItemWithPowerLevel() { abstract class ProfileMatrixItemWithPowerLevelWithPresence : ProfileMatrixItemWithPowerLevel() {
@EpoxyAttribute var showPresence: Boolean = true @EpoxyAttribute var showPresence: Boolean = true

View File

@ -23,8 +23,8 @@ import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
@EpoxyModelClass(layout = R.layout.item_profile_matrix_item_progress) @EpoxyModelClass
abstract class ProfileMatrixItemWithProgress : BaseProfileMatrixItem<ProfileMatrixItemWithProgress.Holder>() { abstract class ProfileMatrixItemWithProgress : BaseProfileMatrixItem<ProfileMatrixItemWithProgress.Holder>(R.layout.item_profile_matrix_item_progress) {
@EpoxyAttribute var inProgress: Boolean = true @EpoxyAttribute var inProgress: Boolean = true

View File

@ -23,8 +23,8 @@ import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_profile_section) @EpoxyModelClass
abstract class ProfileSectionItem : VectorEpoxyModel<ProfileSectionItem.Holder>() { abstract class ProfileSectionItem : VectorEpoxyModel<ProfileSectionItem.Holder>(R.layout.item_profile_section) {
@EpoxyAttribute @EpoxyAttribute
lateinit var title: String lateinit var title: String

View File

@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.extensions.setTextWithColoredPart import im.vector.app.core.extensions.setTextWithColoredPart
@EpoxyModelClass(layout = R.layout.item_notifications_footer) @EpoxyModelClass
abstract class NotificationSettingsFooterItem : VectorEpoxyModel<NotificationSettingsFooterItem.Holder>() { abstract class NotificationSettingsFooterItem : VectorEpoxyModel<NotificationSettingsFooterItem.Holder>(R.layout.item_notifications_footer) {
@EpoxyAttribute @EpoxyAttribute
var encrypted: Boolean = false var encrypted: Boolean = false

View File

@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setAttributeTintedImageResource import im.vector.app.core.extensions.setAttributeTintedImageResource
@EpoxyModelClass(layout = R.layout.item_radio) @EpoxyModelClass
abstract class RadioButtonItem : VectorEpoxyModel<RadioButtonItem.Holder>() { abstract class RadioButtonItem : VectorEpoxyModel<RadioButtonItem.Holder>(R.layout.item_radio) {
@EpoxyAttribute @EpoxyAttribute
var title: String? = null var title: String? = null

View File

@ -24,8 +24,8 @@ import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_text_header) @EpoxyModelClass
abstract class TextHeaderItem : VectorEpoxyModel<TextHeaderItem.Holder>() { abstract class TextHeaderItem : VectorEpoxyModel<TextHeaderItem.Holder>(R.layout.item_text_header) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -27,8 +27,8 @@ import im.vector.app.core.extensions.setTextOrHide
/** /**
* A title for bottom sheet, with an optional subtitle. It does not include the bottom separator. * A title for bottom sheet, with an optional subtitle. It does not include the bottom separator.
*/ */
@EpoxyModelClass(layout = R.layout.item_bottom_sheet_title) @EpoxyModelClass
abstract class BottomSheetTitleItem : VectorEpoxyModel<BottomSheetTitleItem.Holder>() { abstract class BottomSheetTitleItem : VectorEpoxyModel<BottomSheetTitleItem.Holder>(R.layout.item_bottom_sheet_title) {
@EpoxyAttribute @EpoxyAttribute
lateinit var title: String lateinit var title: String

View File

@ -28,8 +28,10 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
/** /**
* A generic button list item. * A generic button list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_positive_destrutive_buttons) @EpoxyModelClass
abstract class ButtonPositiveDestructiveButtonBarItem : VectorEpoxyModel<ButtonPositiveDestructiveButtonBarItem.Holder>() { abstract class ButtonPositiveDestructiveButtonBarItem : VectorEpoxyModel<ButtonPositiveDestructiveButtonBarItem.Holder>(
R.layout.item_positive_destrutive_buttons
) {
@EpoxyAttribute @EpoxyAttribute
var positiveText: EpoxyCharSequence? = null var positiveText: EpoxyCharSequence? = null

View File

@ -33,8 +33,8 @@ import im.vector.app.features.themes.ThemeUtils
/** /**
* A generic button list item. * A generic button list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_button) @EpoxyModelClass
abstract class GenericButtonItem : VectorEpoxyModel<GenericButtonItem.Holder>() { abstract class GenericButtonItem : VectorEpoxyModel<GenericButtonItem.Holder>(R.layout.item_generic_button) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -35,8 +35,8 @@ import im.vector.app.core.extensions.setTextOrHide
/** /**
* A generic list item to display when there is no results, with an optional CTA. * A generic list item to display when there is no results, with an optional CTA.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_empty_state) @EpoxyModelClass
abstract class GenericEmptyWithActionItem : VectorEpoxyModel<GenericEmptyWithActionItem.Holder>() { abstract class GenericEmptyWithActionItem : VectorEpoxyModel<GenericEmptyWithActionItem.Holder>(R.layout.item_generic_empty_state) {
@EpoxyAttribute @EpoxyAttribute
var title: String? = null var title: String? = null

View File

@ -35,8 +35,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
* Can display an accessory on the right, that can be an image or an indeterminate progress. * Can display an accessory on the right, that can be an image or an indeterminate progress.
* If provided with an action, will display a button at the bottom of the list item. * If provided with an action, will display a button at the bottom of the list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_footer) @EpoxyModelClass
abstract class GenericFooterItem : VectorEpoxyModel<GenericFooterItem.Holder>() { abstract class GenericFooterItem : VectorEpoxyModel<GenericFooterItem.Holder>(R.layout.item_generic_footer) {
@EpoxyAttribute @EpoxyAttribute
var text: EpoxyCharSequence? = null var text: EpoxyCharSequence? = null

View File

@ -28,8 +28,8 @@ import im.vector.app.features.themes.ThemeUtils
/** /**
* A generic list item header left aligned with notice color. * A generic list item header left aligned with notice color.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_header) @EpoxyModelClass
abstract class GenericHeaderItem : VectorEpoxyModel<GenericHeaderItem.Holder>() { abstract class GenericHeaderItem : VectorEpoxyModel<GenericHeaderItem.Holder>(R.layout.item_generic_header) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -38,8 +38,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
* Can display an accessory on the right, that can be an image or an indeterminate progress. * Can display an accessory on the right, that can be an image or an indeterminate progress.
* If provided with an action, will display a button at the bottom of the list item. * If provided with an action, will display a button at the bottom of the list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_list) @EpoxyModelClass
abstract class GenericItem : VectorEpoxyModel<GenericItem.Holder>() { abstract class GenericItem : VectorEpoxyModel<GenericItem.Holder>(R.layout.item_generic_list) {
@EpoxyAttribute @EpoxyAttribute
var title: EpoxyCharSequence? = null var title: EpoxyCharSequence? = null

View File

@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A generic list item header left aligned with notice color. * A generic list item header left aligned with notice color.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_loader) @EpoxyModelClass
abstract class GenericLoaderItem : VectorEpoxyModel<GenericLoaderItem.Holder>() { abstract class GenericLoaderItem : VectorEpoxyModel<GenericLoaderItem.Holder>(R.layout.item_generic_loader) {
// Maybe/Later add some style configuration, SMALL/BIG ? // Maybe/Later add some style configuration, SMALL/BIG ?

View File

@ -36,8 +36,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
/** /**
* A generic list item with a rounded corner background and an optional icon. * A generic list item with a rounded corner background and an optional icon.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_pill_footer) @EpoxyModelClass
abstract class GenericPillItem : VectorEpoxyModel<GenericPillItem.Holder>() { abstract class GenericPillItem : VectorEpoxyModel<GenericPillItem.Holder>(R.layout.item_generic_pill_footer) {
@EpoxyAttribute @EpoxyAttribute
var text: EpoxyCharSequence? = null var text: EpoxyCharSequence? = null

View File

@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.onClick
/** /**
* A generic button list item. * A generic button list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_positive_button) @EpoxyModelClass
abstract class GenericPositiveButtonItem : VectorEpoxyModel<GenericPositiveButtonItem.Holder>() { abstract class GenericPositiveButtonItem : VectorEpoxyModel<GenericPositiveButtonItem.Holder>(R.layout.item_positive_button) {
@EpoxyAttribute @EpoxyAttribute
var text: String? = null var text: String? = null

View File

@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A generic progress bar item. * A generic progress bar item.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_progress) @EpoxyModelClass
abstract class GenericProgressBarItem : VectorEpoxyModel<GenericProgressBarItem.Holder>() { abstract class GenericProgressBarItem : VectorEpoxyModel<GenericProgressBarItem.Holder>(R.layout.item_generic_progress) {
@EpoxyAttribute @EpoxyAttribute
var progress: Int = 0 var progress: Int = 0

View File

@ -38,8 +38,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
* Can display an accessory on the right, that can be an image or an indeterminate progress. * Can display an accessory on the right, that can be an image or an indeterminate progress.
* If provided with an action, will display a button at the bottom of the list item. * If provided with an action, will display a button at the bottom of the list item.
*/ */
@EpoxyModelClass(layout = R.layout.item_generic_with_value) @EpoxyModelClass
abstract class GenericWithValueItem : VectorEpoxyModel<GenericWithValueItem.Holder>() { abstract class GenericWithValueItem : VectorEpoxyModel<GenericWithValueItem.Holder>(R.layout.item_generic_with_value) {
@EpoxyAttribute @EpoxyAttribute
var title: EpoxyCharSequence? = null var title: EpoxyCharSequence? = null

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A generic item with empty space. * A generic item with empty space.
*/ */
@EpoxyModelClass(layout = R.layout.item_vertical_margin) @EpoxyModelClass
abstract class VerticalMarginItem : VectorEpoxyModel<VerticalMarginItem.Holder>() { abstract class VerticalMarginItem : VectorEpoxyModel<VerticalMarginItem.Holder>(R.layout.item_vertical_margin) {
@EpoxyAttribute @EpoxyAttribute
var heightInPx: Int = 0 var heightInPx: Int = 0

View File

@ -18,6 +18,7 @@ package im.vector.app.features.attachments.preview
import android.view.View import android.view.View
import android.widget.ImageView import android.widget.ImageView
import androidx.annotation.LayoutRes
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
@ -29,7 +30,7 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.platform.CheckableImageView import im.vector.app.core.platform.CheckableImageView
import org.matrix.android.sdk.api.session.content.ContentAttachmentData import org.matrix.android.sdk.api.session.content.ContentAttachmentData
abstract class AttachmentPreviewItem<H : AttachmentPreviewItem.Holder> : VectorEpoxyModel<H>() { abstract class AttachmentPreviewItem<H : AttachmentPreviewItem.Holder>(@LayoutRes layoutId: Int) : VectorEpoxyModel<H>(layoutId) {
abstract val attachment: ContentAttachmentData abstract val attachment: ContentAttachmentData
@ -52,8 +53,8 @@ abstract class AttachmentPreviewItem<H : AttachmentPreviewItem.Holder> : VectorE
} }
} }
@EpoxyModelClass(layout = R.layout.item_attachment_miniature_preview) @EpoxyModelClass
abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem<AttachmentMiniaturePreviewItem.Holder>() { abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem<AttachmentMiniaturePreviewItem.Holder>(R.layout.item_attachment_miniature_preview) {
@EpoxyAttribute override lateinit var attachment: ContentAttachmentData @EpoxyAttribute override lateinit var attachment: ContentAttachmentData
@ -78,8 +79,8 @@ abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem<Attachment
} }
} }
@EpoxyModelClass(layout = R.layout.item_attachment_big_preview) @EpoxyModelClass
abstract class AttachmentBigPreviewItem : AttachmentPreviewItem<AttachmentBigPreviewItem.Holder>() { abstract class AttachmentBigPreviewItem : AttachmentPreviewItem<AttachmentBigPreviewItem.Holder>(R.layout.item_attachment_big_preview) {
@EpoxyAttribute override lateinit var attachment: ContentAttachmentData @EpoxyAttribute override lateinit var attachment: ContentAttachmentData

View File

@ -23,8 +23,8 @@ import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_autocomplete_header_item) @EpoxyModelClass
abstract class AutocompleteHeaderItem : VectorEpoxyModel<AutocompleteHeaderItem.Holder>() { abstract class AutocompleteHeaderItem : VectorEpoxyModel<AutocompleteHeaderItem.Holder>(R.layout.item_autocomplete_header_item) {
@EpoxyAttribute var title: String? = null @EpoxyAttribute var title: String? = null

View File

@ -30,8 +30,8 @@ import im.vector.app.features.displayname.getBestName
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_autocomplete_matrix_item) @EpoxyModelClass
abstract class AutocompleteMatrixItem : VectorEpoxyModel<AutocompleteMatrixItem.Holder>() { abstract class AutocompleteMatrixItem : VectorEpoxyModel<AutocompleteMatrixItem.Holder>(R.layout.item_autocomplete_matrix_item) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute lateinit var matrixItem: MatrixItem

View File

@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
@EpoxyModelClass(layout = R.layout.item_autocomplete_command) @EpoxyModelClass
abstract class AutocompleteCommandItem : VectorEpoxyModel<AutocompleteCommandItem.Holder>() { abstract class AutocompleteCommandItem : VectorEpoxyModel<AutocompleteCommandItem.Holder>(R.layout.item_autocomplete_command) {
@EpoxyAttribute @EpoxyAttribute
var name: String? = null var name: String? = null

View File

@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
import im.vector.app.features.reactions.data.EmojiItem import im.vector.app.features.reactions.data.EmojiItem
@EpoxyModelClass(layout = R.layout.item_autocomplete_emoji) @EpoxyModelClass
abstract class AutocompleteEmojiItem : VectorEpoxyModel<AutocompleteEmojiItem.Holder>() { abstract class AutocompleteEmojiItem : VectorEpoxyModel<AutocompleteEmojiItem.Holder>(R.layout.item_autocomplete_emoji) {
@EpoxyAttribute @EpoxyAttribute
lateinit var emojiItem: EmojiItem lateinit var emojiItem: EmojiItem

View File

@ -21,8 +21,8 @@ import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_autocomplete_more_result) @EpoxyModelClass
abstract class AutocompleteMoreResultItem : VectorEpoxyModel<AutocompleteMoreResultItem.Holder>() { abstract class AutocompleteMoreResultItem : VectorEpoxyModel<AutocompleteMoreResultItem.Holder>(R.layout.item_autocomplete_more_result) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_contact_detail) @EpoxyModelClass
abstract class ContactDetailItem : VectorEpoxyModel<ContactDetailItem.Holder>() { abstract class ContactDetailItem : VectorEpoxyModel<ContactDetailItem.Holder>(R.layout.item_contact_detail) {
@EpoxyAttribute lateinit var threePid: String @EpoxyAttribute lateinit var threePid: String
@EpoxyAttribute var matrixId: String? = null @EpoxyAttribute var matrixId: String? = null

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
@EpoxyModelClass(layout = R.layout.item_contact_main) @EpoxyModelClass
abstract class ContactItem : VectorEpoxyModel<ContactItem.Holder>() { abstract class ContactItem : VectorEpoxyModel<ContactItem.Holder>(R.layout.item_contact_main) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var mappedContact: MappedContact @EpoxyAttribute lateinit var mappedContact: MappedContact

View File

@ -27,8 +27,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_keys_backup_settings_button_footer) @EpoxyModelClass
abstract class KeysBackupSettingFooterItem : VectorEpoxyModel<KeysBackupSettingFooterItem.Holder>() { abstract class KeysBackupSettingFooterItem : VectorEpoxyModel<KeysBackupSettingFooterItem.Holder>(R.layout.item_keys_backup_settings_button_footer) {
@EpoxyAttribute @EpoxyAttribute
var textButton1: String? = null var textButton1: String? = null

View File

@ -24,7 +24,7 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_wait) @EpoxyModelClass
abstract class BottomSheetSelfWaitItem : VectorEpoxyModel<BottomSheetSelfWaitItem.Holder>() { abstract class BottomSheetSelfWaitItem : VectorEpoxyModel<BottomSheetSelfWaitItem.Holder>(R.layout.item_verification_wait) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -34,8 +34,8 @@ import im.vector.app.core.extensions.setTextOrHide
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_action) @EpoxyModelClass
abstract class BottomSheetVerificationActionItem : VectorEpoxyModel<BottomSheetVerificationActionItem.Holder>() { abstract class BottomSheetVerificationActionItem : VectorEpoxyModel<BottomSheetVerificationActionItem.Holder>(R.layout.item_verification_action) {
@EpoxyAttribute @EpoxyAttribute
@DrawableRes @DrawableRes

View File

@ -27,8 +27,8 @@ import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_big_image) @EpoxyModelClass
abstract class BottomSheetVerificationBigImageItem : VectorEpoxyModel<BottomSheetVerificationBigImageItem.Holder>() { abstract class BottomSheetVerificationBigImageItem : VectorEpoxyModel<BottomSheetVerificationBigImageItem.Holder>(R.layout.item_verification_big_image) {
@EpoxyAttribute @EpoxyAttribute
lateinit var roomEncryptionTrustLevel: RoomEncryptionTrustLevel lateinit var roomEncryptionTrustLevel: RoomEncryptionTrustLevel

View File

@ -26,8 +26,10 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_decimal_code) @EpoxyModelClass
abstract class BottomSheetVerificationDecimalCodeItem : VectorEpoxyModel<BottomSheetVerificationDecimalCodeItem.Holder>() { abstract class BottomSheetVerificationDecimalCodeItem : VectorEpoxyModel<BottomSheetVerificationDecimalCodeItem.Holder>(
R.layout.item_verification_decimal_code
) {
@EpoxyAttribute @EpoxyAttribute
var code: String = "" var code: String = ""

View File

@ -34,8 +34,8 @@ import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentatio
/** /**
* A emoji list for bottom sheet. * A emoji list for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_emojis) @EpoxyModelClass
abstract class BottomSheetVerificationEmojisItem : VectorEpoxyModel<BottomSheetVerificationEmojisItem.Holder>() { abstract class BottomSheetVerificationEmojisItem : VectorEpoxyModel<BottomSheetVerificationEmojisItem.Holder>(R.layout.item_verification_emojis) {
@EpoxyAttribute lateinit var emojiRepresentation0: EmojiRepresentation @EpoxyAttribute lateinit var emojiRepresentation0: EmojiRepresentation
@EpoxyAttribute lateinit var emojiRepresentation1: EmojiRepresentation @EpoxyAttribute lateinit var emojiRepresentation1: EmojiRepresentation

View File

@ -27,8 +27,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_notice) @EpoxyModelClass
abstract class BottomSheetVerificationNoticeItem : VectorEpoxyModel<BottomSheetVerificationNoticeItem.Holder>() { abstract class BottomSheetVerificationNoticeItem : VectorEpoxyModel<BottomSheetVerificationNoticeItem.Holder>(R.layout.item_verification_notice) {
@EpoxyAttribute @EpoxyAttribute
lateinit var notice: EpoxyCharSequence lateinit var notice: EpoxyCharSequence

View File

@ -26,8 +26,8 @@ import im.vector.app.core.ui.views.QrCodeImageView
/** /**
* An Epoxy item displaying a QR code. * An Epoxy item displaying a QR code.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_qr_code) @EpoxyModelClass
abstract class BottomSheetVerificationQrCodeItem : VectorEpoxyModel<BottomSheetVerificationQrCodeItem.Holder>() { abstract class BottomSheetVerificationQrCodeItem : VectorEpoxyModel<BottomSheetVerificationQrCodeItem.Holder>(R.layout.item_verification_qr_code) {
@EpoxyAttribute @EpoxyAttribute
lateinit var data: String lateinit var data: String

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
/** /**
* A action for bottom sheet. * A action for bottom sheet.
*/ */
@EpoxyModelClass(layout = R.layout.item_verification_waiting) @EpoxyModelClass
abstract class BottomSheetVerificationWaitingItem : VectorEpoxyModel<BottomSheetVerificationWaitingItem.Holder>() { abstract class BottomSheetVerificationWaitingItem : VectorEpoxyModel<BottomSheetVerificationWaitingItem.Holder>(R.layout.item_verification_waiting) {
@EpoxyAttribute @EpoxyAttribute
var title: String = "" var title: String = ""

View File

@ -23,11 +23,12 @@ import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_discovery_policy) @EpoxyModelClass
abstract class DiscoveryPolicyItem : EpoxyModelWithHolder<DiscoveryPolicyItem.Holder>() { abstract class DiscoveryPolicyItem : VectorEpoxyModel<DiscoveryPolicyItem.Holder>(R.layout.item_discovery_policy) {
@EpoxyAttribute @EpoxyAttribute
var name: String? = null var name: String? = null

View File

@ -23,13 +23,14 @@ import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.attributes.ButtonStyle import im.vector.app.core.epoxy.attributes.ButtonStyle
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
import im.vector.app.core.resources.ColorProvider import im.vector.app.core.resources.ColorProvider
@EpoxyModelClass(layout = R.layout.item_settings_button) @EpoxyModelClass
abstract class SettingsButtonItem : EpoxyModelWithHolder<SettingsButtonItem.Holder>() { abstract class SettingsButtonItem : VectorEpoxyModel<SettingsButtonItem.Holder>(R.layout.item_settings_button) {
@EpoxyAttribute @EpoxyAttribute
lateinit var colorProvider: ColorProvider lateinit var colorProvider: ColorProvider

View File

@ -19,12 +19,12 @@ import android.widget.ImageView
import androidx.annotation.DrawableRes import androidx.annotation.DrawableRes
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_settings_centered_image) @EpoxyModelClass
abstract class SettingsCenteredImageItem : EpoxyModelWithHolder<SettingsCenteredImageItem.Holder>() { abstract class SettingsCenteredImageItem : VectorEpoxyModel<SettingsCenteredImageItem.Holder>(R.layout.item_settings_centered_image) {
@EpoxyAttribute @EpoxyAttribute
@DrawableRes @DrawableRes

View File

@ -18,14 +18,14 @@ package im.vector.app.features.discovery
import android.widget.Button import android.widget.Button
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
@EpoxyModelClass(layout = R.layout.item_settings_continue_cancel) @EpoxyModelClass
abstract class SettingsContinueCancelItem : EpoxyModelWithHolder<SettingsContinueCancelItem.Holder>() { abstract class SettingsContinueCancelItem : VectorEpoxyModel<SettingsContinueCancelItem.Holder>(R.layout.item_settings_continue_cancel) {
@EpoxyAttribute @EpoxyAttribute
var continueText: String? = null var continueText: String? = null

View File

@ -22,15 +22,15 @@ import android.widget.TextView
import androidx.core.widget.doOnTextChanged import androidx.core.widget.doOnTextChanged
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
import im.vector.app.core.extensions.showKeyboard import im.vector.app.core.extensions.showKeyboard
@EpoxyModelClass(layout = R.layout.item_settings_edit_text) @EpoxyModelClass
abstract class SettingsEditTextItem : EpoxyModelWithHolder<SettingsEditTextItem.Holder>() { abstract class SettingsEditTextItem : VectorEpoxyModel<SettingsEditTextItem.Holder>(R.layout.item_settings_edit_text) {
@EpoxyAttribute var hint: String? = null @EpoxyAttribute var hint: String? = null
@EpoxyAttribute var value: String? = null @EpoxyAttribute var value: String? = null

View File

@ -20,15 +20,15 @@ import androidx.annotation.DrawableRes
import androidx.annotation.StringRes import androidx.annotation.StringRes
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_settings_helper_info) @EpoxyModelClass
abstract class SettingsInfoItem : EpoxyModelWithHolder<SettingsInfoItem.Holder>() { abstract class SettingsInfoItem : VectorEpoxyModel<SettingsInfoItem.Holder>(R.layout.item_settings_helper_info) {
@EpoxyAttribute @EpoxyAttribute
var helperText: String? = null var helperText: String? = null

View File

@ -19,12 +19,12 @@ import android.widget.TextView
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_settings_information) @EpoxyModelClass
abstract class SettingsInformationItem : EpoxyModelWithHolder<SettingsInformationItem.Holder>() { abstract class SettingsInformationItem : VectorEpoxyModel<SettingsInformationItem.Holder>(R.layout.item_settings_information) {
@EpoxyAttribute @EpoxyAttribute
lateinit var message: String lateinit var message: String

View File

@ -20,16 +20,16 @@ import androidx.annotation.StringRes
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.google.android.material.switchmaterial.SwitchMaterial import com.google.android.material.switchmaterial.SwitchMaterial
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_settings_simple_item) @EpoxyModelClass
abstract class SettingsItem : EpoxyModelWithHolder<SettingsItem.Holder>() { abstract class SettingsItem : VectorEpoxyModel<SettingsItem.Holder>(R.layout.item_settings_simple_item) {
@EpoxyAttribute @EpoxyAttribute
var title: String? = null var title: String? = null

View File

@ -16,12 +16,12 @@
package im.vector.app.features.discovery package im.vector.app.features.discovery
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_settings_progress) @EpoxyModelClass
abstract class SettingsProgressItem : EpoxyModelWithHolder<SettingsProgressItem.Holder>() { abstract class SettingsProgressItem : VectorEpoxyModel<SettingsProgressItem.Holder>(R.layout.item_settings_progress) {
class Holder : VectorEpoxyHolder() class Holder : VectorEpoxyHolder()
} }

View File

@ -19,13 +19,13 @@ import android.widget.TextView
import androidx.annotation.StringRes import androidx.annotation.StringRes
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_settings_section_title) @EpoxyModelClass
abstract class SettingsSectionTitleItem : EpoxyModelWithHolder<SettingsSectionTitleItem.Holder>() { abstract class SettingsSectionTitleItem : VectorEpoxyModel<SettingsSectionTitleItem.Holder>(R.layout.item_settings_section_title) {
@EpoxyAttribute @EpoxyAttribute
var title: String? = null var title: String? = null

View File

@ -25,11 +25,11 @@ import androidx.core.view.isInvisible
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.google.android.material.switchmaterial.SwitchMaterial import com.google.android.material.switchmaterial.SwitchMaterial
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.attributes.ButtonStyle import im.vector.app.core.epoxy.attributes.ButtonStyle
import im.vector.app.core.epoxy.attributes.ButtonType import im.vector.app.core.epoxy.attributes.ButtonType
import im.vector.app.core.epoxy.attributes.IconMode import im.vector.app.core.epoxy.attributes.IconMode
@ -39,8 +39,8 @@ import im.vector.app.core.resources.ColorProvider
import im.vector.app.core.resources.StringProvider import im.vector.app.core.resources.StringProvider
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
@EpoxyModelClass(layout = R.layout.item_settings_button_single_line) @EpoxyModelClass
abstract class SettingsTextButtonSingleLineItem : EpoxyModelWithHolder<SettingsTextButtonSingleLineItem.Holder>() { abstract class SettingsTextButtonSingleLineItem : VectorEpoxyModel<SettingsTextButtonSingleLineItem.Holder>(R.layout.item_settings_button_single_line) {
@EpoxyAttribute @EpoxyAttribute
lateinit var colorProvider: ColorProvider lateinit var colorProvider: ColorProvider

View File

@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
@EpoxyModelClass(layout = R.layout.item_form_advanced_toggle) @EpoxyModelClass
abstract class FormAdvancedToggleItem : VectorEpoxyModel<FormAdvancedToggleItem.Holder>() { abstract class FormAdvancedToggleItem : VectorEpoxyModel<FormAdvancedToggleItem.Holder>(R.layout.item_form_advanced_toggle) {
@EpoxyAttribute lateinit var title: String @EpoxyAttribute lateinit var title: String
@EpoxyAttribute var expanded: Boolean = false @EpoxyAttribute var expanded: Boolean = false

View File

@ -34,8 +34,8 @@ import im.vector.app.core.epoxy.addTextChangedListenerOnce
import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.epoxy.setValueOnce
import im.vector.app.core.platform.SimpleTextWatcher import im.vector.app.core.platform.SimpleTextWatcher
@EpoxyModelClass(layout = R.layout.item_form_text_input) @EpoxyModelClass
abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>() { abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>(R.layout.item_form_text_input) {
@EpoxyAttribute @EpoxyAttribute
var hint: String? = null var hint: String? = null

View File

@ -32,8 +32,8 @@ import im.vector.app.core.epoxy.onClick
import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.epoxy.setValueOnce
import im.vector.app.core.platform.SimpleTextWatcher import im.vector.app.core.platform.SimpleTextWatcher
@EpoxyModelClass(layout = R.layout.item_form_text_input_with_button) @EpoxyModelClass
abstract class FormEditTextWithButtonItem : VectorEpoxyModel<FormEditTextWithButtonItem.Holder>() { abstract class FormEditTextWithButtonItem : VectorEpoxyModel<FormEditTextWithButtonItem.Holder>(R.layout.item_form_text_input_with_button) {
@EpoxyAttribute @EpoxyAttribute
var hint: String? = null var hint: String? = null

View File

@ -34,8 +34,8 @@ import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextIfDifferent import im.vector.app.core.extensions.setTextIfDifferent
import im.vector.app.core.platform.SimpleTextWatcher import im.vector.app.core.platform.SimpleTextWatcher
@EpoxyModelClass(layout = R.layout.item_form_text_input_with_delete) @EpoxyModelClass
abstract class FormEditTextWithDeleteItem : VectorEpoxyModel<FormEditTextWithDeleteItem.Holder>() { abstract class FormEditTextWithDeleteItem : VectorEpoxyModel<FormEditTextWithDeleteItem.Holder>(R.layout.item_form_text_input_with_delete) {
@EpoxyAttribute @EpoxyAttribute
var hint: String? = null var hint: String? = null

View File

@ -21,18 +21,18 @@ import android.widget.ImageView
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.glide.GlideApp import im.vector.app.core.glide.GlideApp
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_editable_avatar) @EpoxyModelClass
abstract class FormEditableAvatarItem : EpoxyModelWithHolder<FormEditableAvatarItem.Holder>() { abstract class FormEditableAvatarItem : VectorEpoxyModel<FormEditableAvatarItem.Holder>(R.layout.item_editable_avatar) {
@EpoxyAttribute @EpoxyAttribute
var avatarRenderer: AvatarRenderer? = null var avatarRenderer: AvatarRenderer? = null

View File

@ -22,20 +22,20 @@ import android.widget.ImageView
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.bumptech.glide.load.MultiTransformation import com.bumptech.glide.load.MultiTransformation
import com.bumptech.glide.load.resource.bitmap.CenterCrop import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.glide.GlideApp import im.vector.app.core.glide.GlideApp
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_editable_square_avatar) @EpoxyModelClass
abstract class FormEditableSquareAvatarItem : EpoxyModelWithHolder<FormEditableSquareAvatarItem.Holder>() { abstract class FormEditableSquareAvatarItem : VectorEpoxyModel<FormEditableSquareAvatarItem.Holder>(R.layout.item_editable_square_avatar) {
@EpoxyAttribute @EpoxyAttribute
var avatarRenderer: AvatarRenderer? = null var avatarRenderer: AvatarRenderer? = null

View File

@ -30,8 +30,8 @@ import im.vector.app.core.epoxy.addTextChangedListenerOnce
import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.epoxy.setValueOnce
import im.vector.app.core.platform.SimpleTextWatcher import im.vector.app.core.platform.SimpleTextWatcher
@EpoxyModelClass(layout = R.layout.item_form_multiline_text_input) @EpoxyModelClass
abstract class FormMultiLineEditTextItem : VectorEpoxyModel<FormMultiLineEditTextItem.Holder>() { abstract class FormMultiLineEditTextItem : VectorEpoxyModel<FormMultiLineEditTextItem.Holder>(R.layout.item_form_multiline_text_input) {
@EpoxyAttribute @EpoxyAttribute
var hint: String? = null var hint: String? = null

View File

@ -19,15 +19,15 @@ import android.widget.Button
import androidx.annotation.StringRes import androidx.annotation.StringRes
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_form_submit_button) @EpoxyModelClass
abstract class FormSubmitButtonItem : EpoxyModelWithHolder<FormSubmitButtonItem.Holder>() { abstract class FormSubmitButtonItem : VectorEpoxyModel<FormSubmitButtonItem.Holder>(R.layout.item_form_submit_button) {
@EpoxyAttribute @EpoxyAttribute
var enabled: Boolean = true var enabled: Boolean = true

View File

@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.epoxy.setValueOnce
import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextOrHide
@EpoxyModelClass(layout = R.layout.item_form_switch) @EpoxyModelClass
abstract class FormSwitchItem : VectorEpoxyModel<FormSwitchItem.Holder>() { abstract class FormSwitchItem : VectorEpoxyModel<FormSwitchItem.Holder>(R.layout.item_form_switch) {
@EpoxyAttribute @EpoxyAttribute
var listener: ((Boolean) -> Unit)? = null var listener: ((Boolean) -> Unit)? = null

View File

@ -30,8 +30,8 @@ import im.vector.app.core.platform.CheckableConstraintLayout
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_group) @EpoxyModelClass
abstract class GroupSummaryItem : VectorEpoxyModel<GroupSummaryItem.Holder>() { abstract class GroupSummaryItem : VectorEpoxyModel<GroupSummaryItem.Holder>(R.layout.item_group) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute lateinit var matrixItem: MatrixItem

View File

@ -34,8 +34,8 @@ import im.vector.app.core.platform.CheckableConstraintLayout
import im.vector.app.features.home.room.list.UnreadCounterBadgeView import im.vector.app.features.home.room.list.UnreadCounterBadgeView
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
@EpoxyModelClass(layout = R.layout.item_space) @EpoxyModelClass
abstract class HomeSpaceSummaryItem : VectorEpoxyModel<HomeSpaceSummaryItem.Holder>() { abstract class HomeSpaceSummaryItem : VectorEpoxyModel<HomeSpaceSummaryItem.Holder>(R.layout.item_space) {
@EpoxyAttribute var selected: Boolean = false @EpoxyAttribute var selected: Boolean = false
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null

View File

@ -32,8 +32,8 @@ import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.home.room.list.UnreadCounterBadgeView import im.vector.app.features.home.room.list.UnreadCounterBadgeView
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_breadcrumbs) @EpoxyModelClass
abstract class BreadcrumbsItem : VectorEpoxyModel<BreadcrumbsItem.Holder>() { abstract class BreadcrumbsItem : VectorEpoxyModel<BreadcrumbsItem.Holder>(R.layout.item_breadcrumbs) {
@EpoxyAttribute var hasTypingUsers: Boolean = false @EpoxyAttribute var hasTypingUsers: Boolean = false
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer

View File

@ -21,17 +21,17 @@ import android.widget.TextView
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.onClick
import im.vector.app.features.displayname.getBestName import im.vector.app.features.displayname.getBestName
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_display_read_receipt) @EpoxyModelClass
abstract class DisplayReadReceiptItem : EpoxyModelWithHolder<DisplayReadReceiptItem.Holder>() { abstract class DisplayReadReceiptItem : VectorEpoxyModel<DisplayReadReceiptItem.Holder>(R.layout.item_display_read_receipt) {
@EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var timestamp: String? = null @EpoxyAttribute var timestamp: String? = null

View File

@ -34,8 +34,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence
import org.matrix.android.sdk.api.session.threads.ThreadDetails import org.matrix.android.sdk.api.session.threads.ThreadDetails
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_search_result) @EpoxyModelClass
abstract class SearchResultItem : VectorEpoxyModel<SearchResultItem.Holder>() { abstract class SearchResultItem : VectorEpoxyModel<SearchResultItem.Holder>(R.layout.item_search_result) {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute var formattedDate: String? = null @EpoxyAttribute var formattedDate: String? = null

View File

@ -23,6 +23,7 @@ import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import androidx.appcompat.view.ContextThemeWrapper import androidx.appcompat.view.ContextThemeWrapper
import androidx.core.content.ContextCompat.getDrawable import androidx.core.content.ContextCompat.getDrawable
import androidx.core.view.isVisible import androidx.core.view.isVisible
@ -49,7 +50,7 @@ private const val MAX_REACTIONS_TO_SHOW = 8
* Manages associated click listeners and send status. * Manages associated click listeners and send status.
* Should not be used as this, use a subclass. * Should not be used as this, use a subclass.
*/ */
abstract class AbsBaseMessageItem<H : AbsBaseMessageItem.Holder> : BaseEventItem<H>() { abstract class AbsBaseMessageItem<H : AbsBaseMessageItem.Holder>(@LayoutRes layoutId: Int) : BaseEventItem<H>(layoutId) {
abstract val baseAttributes: Attributes abstract val baseAttributes: Attributes

View File

@ -24,6 +24,7 @@ import android.widget.ProgressBar
import android.widget.RelativeLayout import android.widget.RelativeLayout
import android.widget.TextView import android.widget.TextView
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams import androidx.core.view.updateLayoutParams
@ -42,7 +43,7 @@ import org.matrix.android.sdk.api.util.MatrixItem
* Base timeline item that adds an optional information bar with the sender avatar, name, time, send state. * Base timeline item that adds an optional information bar with the sender avatar, name, time, send state.
* Adds associated click listeners (on avatar, displayname). * Adds associated click listeners (on avatar, displayname).
*/ */
abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>() { abstract class AbsMessageItem<H : AbsMessageItem.Holder>(@LayoutRes layoutId: Int) : AbsBaseMessageItem<H>(layoutId) {
override val baseAttributes: AbsBaseMessageItem.Attributes override val baseAttributes: AbsBaseMessageItem.Attributes
get() = attributes get() = attributes

View File

@ -20,6 +20,7 @@ import android.graphics.drawable.Drawable
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams import androidx.core.view.updateLayoutParams
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
@ -36,7 +37,7 @@ import im.vector.app.features.home.room.detail.timeline.helper.LocationPinProvid
import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout
import im.vector.app.features.home.room.detail.timeline.style.granularRoundedCorners import im.vector.app.features.home.room.detail.timeline.style.granularRoundedCorners
abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMessageItem<H>() { abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder>(@LayoutRes layoutId: Int) : AbsMessageItem<H>(layoutId) {
@EpoxyAttribute @EpoxyAttribute
var locationUrl: String? = null var locationUrl: String? = null

View File

@ -20,6 +20,7 @@ import android.view.ViewStub
import android.widget.RelativeLayout import android.widget.RelativeLayout
import androidx.annotation.CallSuper import androidx.annotation.CallSuper
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import androidx.core.view.updateLayoutParams import androidx.core.view.updateLayoutParams
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import im.vector.app.R import im.vector.app.R
@ -30,7 +31,7 @@ import im.vector.app.core.platform.CheckableView
/** /**
* Children must override getViewType(). * Children must override getViewType().
*/ */
abstract class BaseEventItem<H : BaseEventItem.BaseHolder> : VectorEpoxyModel<H>(), ItemWithEvents { abstract class BaseEventItem<H : BaseEventItem.BaseHolder>(@LayoutRes layoutId: Int) : VectorEpoxyModel<H>(layoutId), ItemWithEvents {
// To use for instance when opening a permalink with an eventId // To use for instance when opening a permalink with an eventId
@EpoxyAttribute @EpoxyAttribute

View File

@ -19,11 +19,12 @@ package im.vector.app.features.home.room.detail.timeline.item
import android.view.View import android.view.View
import android.widget.TextView import android.widget.TextView
import androidx.annotation.IdRes import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import im.vector.app.R import im.vector.app.R
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
abstract class BasedMergedItem<H : BasedMergedItem.Holder> : BaseEventItem<H>() { abstract class BasedMergedItem<H : BasedMergedItem.Holder>(@LayoutRes layoutId: Int) : BaseEventItem<H>(layoutId) {
abstract val attributes: Attributes abstract val attributes: Attributes

View File

@ -20,7 +20,7 @@ import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_timeline_event_blank_stub) @EpoxyModelClass
abstract class BlankItem : VectorEpoxyModel<BlankItem.BlankHolder>() { abstract class BlankItem : VectorEpoxyModel<BlankItem.BlankHolder>(R.layout.item_timeline_event_blank_stub) {
class BlankHolder : VectorEpoxyHolder() class BlankHolder : VectorEpoxyHolder()
} }

View File

@ -39,8 +39,8 @@ import im.vector.app.features.home.room.detail.timeline.MessageColorProvider
import im.vector.app.features.home.room.detail.timeline.TimelineEventController import im.vector.app.features.home.room.detail.timeline.TimelineEventController
import org.matrix.android.sdk.api.util.MatrixItem import org.matrix.android.sdk.api.util.MatrixItem
@EpoxyModelClass(layout = R.layout.item_timeline_event_base_state) @EpoxyModelClass
abstract class CallTileTimelineItem : AbsBaseMessageItem<CallTileTimelineItem.Holder>() { abstract class CallTileTimelineItem : AbsBaseMessageItem<CallTileTimelineItem.Holder>(R.layout.item_timeline_event_base_state) {
override val baseAttributes: AbsBaseMessageItem.Attributes override val baseAttributes: AbsBaseMessageItem.Attributes
get() = attributes get() = attributes

View File

@ -19,12 +19,12 @@ package im.vector.app.features.home.room.detail.timeline.item
import android.widget.TextView import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import im.vector.app.R import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
@EpoxyModelClass(layout = R.layout.item_timeline_event_day_separator) @EpoxyModelClass
abstract class DaySeparatorItem : EpoxyModelWithHolder<DaySeparatorItem.Holder>() { abstract class DaySeparatorItem : VectorEpoxyModel<DaySeparatorItem.Holder>(R.layout.item_timeline_event_day_separator) {
@EpoxyAttribute lateinit var formattedDay: String @EpoxyAttribute lateinit var formattedDay: String

View File

@ -24,8 +24,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) @EpoxyModelClass
abstract class DefaultItem : BaseEventItem<DefaultItem.Holder>() { abstract class DefaultItem : BaseEventItem<DefaultItem.Holder>(R.layout.item_timeline_event_base_noinfo) {
@EpoxyAttribute @EpoxyAttribute
lateinit var attributes: Attributes lateinit var attributes: Attributes

View File

@ -42,8 +42,8 @@ import me.gujun.android.span.span
import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.util.toMatrixItem import org.matrix.android.sdk.api.util.toMatrixItem
@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) @EpoxyModelClass
abstract class MergedRoomCreationItem : BasedMergedItem<MergedRoomCreationItem.Holder>() { abstract class MergedRoomCreationItem : BasedMergedItem<MergedRoomCreationItem.Holder>(R.layout.item_timeline_event_base_noinfo) {
@EpoxyAttribute @EpoxyAttribute
override lateinit var attributes: Attributes override lateinit var attributes: Attributes

View File

@ -27,8 +27,8 @@ import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R import im.vector.app.R
import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.AvatarRenderer
@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) @EpoxyModelClass
abstract class MergedSimilarEventsItem : BasedMergedItem<MergedSimilarEventsItem.Holder>() { abstract class MergedSimilarEventsItem : BasedMergedItem<MergedSimilarEventsItem.Holder>(R.layout.item_timeline_event_base_noinfo) {
override fun getViewStubId() = STUB_ID override fun getViewStubId() = STUB_ID

View File

@ -37,8 +37,8 @@ import im.vector.app.features.home.room.detail.timeline.helper.ContentUploadStat
import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
@EpoxyModelClass(layout = R.layout.item_timeline_event_base) @EpoxyModelClass
abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() { abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>(R.layout.item_timeline_event_base) {
@EpoxyAttribute @EpoxyAttribute
var filename: String = "" var filename: String = ""

View File

@ -34,8 +34,8 @@ import im.vector.app.features.home.room.detail.timeline.helper.ContentUploadStat
import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLayout
import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.themes.ThemeUtils
@EpoxyModelClass(layout = R.layout.item_timeline_event_base) @EpoxyModelClass
abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>() { abstract class MessageFileItem : AbsMessageItem<MessageFileItem.Holder>(R.layout.item_timeline_event_base) {
@EpoxyAttribute @EpoxyAttribute
var filename: String = "" var filename: String = ""

Some files were not shown because too many files have changed in this diff Show More