diff --git a/changelog.d/6389.misc b/changelog.d/6389.misc new file mode 100644 index 0000000000..fcf9b42c47 --- /dev/null +++ b/changelog.d/6389.misc @@ -0,0 +1 @@ +Replacing Epoxy annotation layout id references with getDefaultLayoutId diff --git a/library/jsonviewer/build.gradle b/library/jsonviewer/build.gradle index e1a3b0c9ee..ad472b0b54 100644 --- a/library/jsonviewer/build.gradle +++ b/library/jsonviewer/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' apply plugin: 'kotlin-kapt' -apply plugin: 'com.jakewharton.butterknife' buildscript { repositories { @@ -15,9 +14,6 @@ buildscript { url 'https://repo1.maven.org/maven2' } } - dependencies { - classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3' - } } android { diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt index 66dfcc5dc3..590df07f4d 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt @@ -29,7 +29,7 @@ import com.airbnb.epoxy.EpoxyModelClass import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence -@EpoxyModelClass(layout = R2.layout.item_jv_base_value) +@EpoxyModelClass internal abstract class ValueItem : EpoxyModelWithHolder() { @EpoxyAttribute @@ -44,6 +44,8 @@ internal abstract class ValueItem : EpoxyModelWithHolder() { @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var itemClickListener: View.OnClickListener? = null + override fun getDefaultLayout() = R.layout.item_jv_base_value + override fun bind(holder: Holder) { super.bind(holder) holder.textView.text = text?.charSequence diff --git a/vector/src/debug/java/im/vector/app/features/debug/features/BooleanFeatureItem.kt b/vector/src/debug/java/im/vector/app/features/debug/features/BooleanFeatureItem.kt index 8665081102..1e9b88c048 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/features/BooleanFeatureItem.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/features/BooleanFeatureItem.kt @@ -23,11 +23,12 @@ import android.widget.Spinner import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass +import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = im.vector.app.R.layout.item_feature) -abstract class BooleanFeatureItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BooleanFeatureItem : VectorEpoxyModel(R.layout.item_feature) { @EpoxyAttribute lateinit var feature: Feature.BooleanFeature diff --git a/vector/src/debug/java/im/vector/app/features/debug/features/EnumFeatureItem.kt b/vector/src/debug/java/im/vector/app/features/debug/features/EnumFeatureItem.kt index a06147c4f8..5231e591da 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/features/EnumFeatureItem.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/features/EnumFeatureItem.kt @@ -23,11 +23,12 @@ import android.widget.Spinner import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass +import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = im.vector.app.R.layout.item_feature) -abstract class EnumFeatureItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class EnumFeatureItem : VectorEpoxyModel(R.layout.item_feature) { @EpoxyAttribute lateinit var feature: Feature.EnumFeature<*> diff --git a/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt b/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt index 9e0c013960..179ee35693 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt @@ -21,14 +21,15 @@ import android.widget.TextView import androidx.core.content.ContextCompat import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass +import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import me.gujun.android.span.image import me.gujun.android.span.span import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentation -@EpoxyModelClass(layout = im.vector.app.R.layout.item_sas_emoji) -abstract class SasEmojiItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SasEmojiItem : VectorEpoxyModel(R.layout.item_sas_emoji) { @EpoxyAttribute var index: Int = 0 @@ -51,9 +52,9 @@ abstract class SasEmojiItem : VectorEpoxyModel() { } class Holder : VectorEpoxyHolder() { - val indexView by bind(im.vector.app.R.id.sas_emoji_index) - val emojiView by bind(im.vector.app.R.id.sas_emoji) - val textView by bind(im.vector.app.R.id.sas_emoji_text) - val idView by bind(im.vector.app.R.id.sas_emoji_text_id) + val indexView by bind(R.id.sas_emoji_index) + val emojiView by bind(R.id.sas_emoji) + val textView by bind(R.id.sas_emoji_text) + val idView by bind(R.id.sas_emoji_text_id) } } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/BottomSheetDividerItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/BottomSheetDividerItem.kt index 2d65f0ce0c..7cdbaab0b7 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/BottomSheetDividerItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/BottomSheetDividerItem.kt @@ -18,7 +18,7 @@ package im.vector.app.core.epoxy import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_divider_on_surface) -abstract class BottomSheetDividerItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetDividerItem : VectorEpoxyModel(R.layout.item_divider_on_surface) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/CheckBoxItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/CheckBoxItem.kt index 2f32fafa9e..dc016c18ec 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/CheckBoxItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/CheckBoxItem.kt @@ -22,8 +22,8 @@ import com.airbnb.epoxy.EpoxyModelClass import com.google.android.material.checkbox.MaterialCheckBox import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_checkbox) -abstract class CheckBoxItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class CheckBoxItem : VectorEpoxyModel(R.layout.item_checkbox) { @EpoxyAttribute var checked: Boolean = false diff --git a/vector/src/main/java/im/vector/app/core/epoxy/DividerItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/DividerItem.kt index 73568444b6..54fd9f6e0b 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/DividerItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/DividerItem.kt @@ -18,7 +18,7 @@ package im.vector.app.core.epoxy import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_divider) -abstract class DividerItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class DividerItem : VectorEpoxyModel(R.layout.item_divider) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/ErrorWithRetryItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/ErrorWithRetryItem.kt index 8d2b2be6c2..4f0767c068 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/ErrorWithRetryItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/ErrorWithRetryItem.kt @@ -23,8 +23,8 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_error_retry) -abstract class ErrorWithRetryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ErrorWithRetryItem : VectorEpoxyModel(R.layout.item_error_retry) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/epoxy/ExpandableTextItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/ExpandableTextItem.kt index 218a22533a..07a4a2f4e1 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/ExpandableTextItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/ExpandableTextItem.kt @@ -28,8 +28,8 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R import im.vector.app.core.extensions.copyOnLongClick -@EpoxyModelClass(layout = R.layout.item_expandable_textview) -abstract class ExpandableTextItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ExpandableTextItem : VectorEpoxyModel(R.layout.item_expandable_textview) { @EpoxyAttribute lateinit var content: String diff --git a/vector/src/main/java/im/vector/app/core/epoxy/HelpFooterItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/HelpFooterItem.kt index bb39bd41d6..c3ab37d19d 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/HelpFooterItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/HelpFooterItem.kt @@ -21,8 +21,8 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_help_footer) -abstract class HelpFooterItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class HelpFooterItem : VectorEpoxyModel(R.layout.item_help_footer) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/epoxy/LoadingItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/LoadingItem.kt index 5cf87bbf78..63aea7dbaf 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/LoadingItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/LoadingItem.kt @@ -24,8 +24,8 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_loading) -abstract class LoadingItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoadingItem : VectorEpoxyModel(R.layout.item_loading) { @EpoxyAttribute var loadingText: String? = null @EpoxyAttribute var showLoader: Boolean = true diff --git a/vector/src/main/java/im/vector/app/core/epoxy/NoResultItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/NoResultItem.kt index d38ed93225..bddcbd0846 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/NoResultItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/NoResultItem.kt @@ -21,8 +21,8 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_no_result) -abstract class NoResultItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class NoResultItem : VectorEpoxyModel(R.layout.item_no_result) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/epoxy/SquareLoadingItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/SquareLoadingItem.kt index 7844a75dae..75ce203927 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/SquareLoadingItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/SquareLoadingItem.kt @@ -19,8 +19,8 @@ package im.vector.app.core.epoxy import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_loading_square) -abstract class SquareLoadingItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SquareLoadingItem : VectorEpoxyModel(R.layout.item_loading_square) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/TimelineEmptyItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/TimelineEmptyItem.kt index c51573bf21..a642981d92 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/TimelineEmptyItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/TimelineEmptyItem.kt @@ -22,8 +22,8 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R import im.vector.app.features.home.room.detail.timeline.item.ItemWithEvents -@EpoxyModelClass(layout = R.layout.item_timeline_empty) -abstract class TimelineEmptyItem : VectorEpoxyModel(), ItemWithEvents { +@EpoxyModelClass +abstract class TimelineEmptyItem : VectorEpoxyModel(R.layout.item_timeline_empty), ItemWithEvents { @EpoxyAttribute lateinit var eventId: String @EpoxyAttribute var notBlank: Boolean = false diff --git a/vector/src/main/java/im/vector/app/core/epoxy/VectorEpoxyModel.kt b/vector/src/main/java/im/vector/app/core/epoxy/VectorEpoxyModel.kt index 9bd16b09a3..66eca2569d 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/VectorEpoxyModel.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/VectorEpoxyModel.kt @@ -17,6 +17,7 @@ package im.vector.app.core.epoxy import androidx.annotation.CallSuper +import androidx.annotation.LayoutRes import com.airbnb.epoxy.EpoxyModelWithHolder import com.airbnb.epoxy.VisibilityState import kotlinx.coroutines.CoroutineScope @@ -27,12 +28,16 @@ import kotlinx.coroutines.cancelChildren /** * EpoxyModelWithHolder which can listen to visibility state change. */ -abstract class VectorEpoxyModel : EpoxyModelWithHolder() { +abstract class VectorEpoxyModel( + @LayoutRes private val layoutId: Int +) : EpoxyModelWithHolder() { protected val coroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Main) private var onModelVisibilityStateChangedListener: OnVisibilityStateChangedListener? = null + final override fun getDefaultLayout() = layoutId + @CallSuper override fun bind(holder: H) { super.bind(holder) diff --git a/vector/src/main/java/im/vector/app/core/epoxy/ZeroItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/ZeroItem.kt index a65e37f96b..dbdb4ddbd9 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/ZeroItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/ZeroItem.kt @@ -23,8 +23,8 @@ import im.vector.app.R * Item of size (0, 0). * 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) -abstract class ZeroItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ZeroItem : VectorEpoxyModel(R.layout.item_zero) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetActionItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetActionItem.kt index ed3d55fca9..0656726e7d 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetActionItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetActionItem.kt @@ -39,8 +39,8 @@ import im.vector.app.features.themes.ThemeUtils /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_action) -abstract class BottomSheetActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetActionItem : VectorEpoxyModel(R.layout.item_bottom_sheet_action) { @EpoxyAttribute @DrawableRes diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetMessagePreviewItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetMessagePreviewItem.kt index b90956ad9e..bb1b0fbd7b 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetMessagePreviewItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetMessagePreviewItem.kt @@ -43,8 +43,8 @@ import org.matrix.android.sdk.api.util.MatrixItem /** * A message preview for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_message_preview) -abstract class BottomSheetMessagePreviewItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetMessagePreviewItem : VectorEpoxyModel(R.layout.item_bottom_sheet_message_preview) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetQuickReactionsItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetQuickReactionsItem.kt index 3f6b23a85f..1b7c9b3409 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetQuickReactionsItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetQuickReactionsItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.onClick /** * A quick reaction list for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_quick_reaction) -abstract class BottomSheetQuickReactionsItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetQuickReactionsItem : VectorEpoxyModel(R.layout.item_bottom_sheet_quick_reaction) { @EpoxyAttribute lateinit var fontProvider: EmojiCompatFontProvider diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRadioActionItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRadioActionItem.kt index 10bf92b7e7..2fe276fe01 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRadioActionItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRadioActionItem.kt @@ -33,8 +33,8 @@ import im.vector.app.core.extensions.setTextOrHide /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_radio) -abstract class BottomSheetRadioActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetRadioActionItem : VectorEpoxyModel(R.layout.item_bottom_sheet_radio) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRoomPreviewItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRoomPreviewItem.kt index 44e8f32cfd..c4e48335b6 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRoomPreviewItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetRoomPreviewItem.kt @@ -39,8 +39,8 @@ import org.matrix.android.sdk.api.util.MatrixItem /** * A room preview for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_room_preview) -abstract class BottomSheetRoomPreviewItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetRoomPreviewItem : VectorEpoxyModel(R.layout.item_bottom_sheet_room_preview) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetSendStateItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetSendStateItem.kt index aa134ac7c4..4b3073f8f2 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetSendStateItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/bottomsheet/BottomSheetSendStateItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A send state for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_message_status) -abstract class BottomSheetSendStateItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetSendStateItem : VectorEpoxyModel(R.layout.item_bottom_sheet_message_status) { @EpoxyAttribute var showProgress: Boolean = false diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt index 956e1de92c..9c5ad49339 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt @@ -17,6 +17,7 @@ package im.vector.app.core.epoxy.profiles import androidx.annotation.CallSuper +import androidx.annotation.LayoutRes import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute 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.util.MatrixItem -abstract class BaseProfileMatrixItem : VectorEpoxyModel() { +abstract class BaseProfileMatrixItem(@LayoutRes layoutId: Int) : VectorEpoxyModel(layoutId) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute var editable: Boolean = true diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileActionItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileActionItem.kt index 33e5172146..12e83ea80d 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileActionItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileActionItem.kt @@ -33,8 +33,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.themes.ThemeUtils import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_profile_action) -abstract class ProfileActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ProfileActionItem : VectorEpoxyModel(R.layout.item_profile_action) { @EpoxyAttribute lateinit var title: String diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt index 90e81ceb26..7e89db24fa 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt @@ -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.ShieldImageView -@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) -abstract class ProfileMatrixItem : BaseProfileMatrixItem() { +@EpoxyModelClass +abstract class ProfileMatrixItem : BaseProfileMatrixItem(R.layout.item_profile_matrix_item) { open class Holder : VectorEpoxyHolder() { val titleView by bind(R.id.matrixItemTitle) diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt index 453f402496..baf4605f04 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt @@ -20,10 +20,9 @@ package im.vector.app.core.epoxy.profiles import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import im.vector.app.R import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) +@EpoxyModelClass abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() { @EpoxyAttribute var ignoredUser: Boolean = false diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevelWithPresence.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevelWithPresence.kt index 923fa80b55..cdb9791c56 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevelWithPresence.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevelWithPresence.kt @@ -19,10 +19,9 @@ package im.vector.app.core.epoxy.profiles import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import im.vector.app.R import org.matrix.android.sdk.api.session.presence.model.UserPresence -@EpoxyModelClass(layout = R.layout.item_profile_matrix_item) +@EpoxyModelClass abstract class ProfileMatrixItemWithPowerLevelWithPresence : ProfileMatrixItemWithPowerLevel() { @EpoxyAttribute var showPresence: Boolean = true diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithProgress.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithProgress.kt index 4966032dde..1b0274b32d 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithProgress.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithProgress.kt @@ -23,8 +23,8 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_profile_matrix_item_progress) -abstract class ProfileMatrixItemWithProgress : BaseProfileMatrixItem() { +@EpoxyModelClass +abstract class ProfileMatrixItemWithProgress : BaseProfileMatrixItem(R.layout.item_profile_matrix_item_progress) { @EpoxyAttribute var inProgress: Boolean = true diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileSectionItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileSectionItem.kt index b38342c057..f607537d54 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileSectionItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileSectionItem.kt @@ -23,8 +23,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_profile_section) -abstract class ProfileSectionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ProfileSectionItem : VectorEpoxyModel(R.layout.item_profile_section) { @EpoxyAttribute lateinit var title: String diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/NotificationSettingsFooterItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/NotificationSettingsFooterItem.kt index 4608f2b1ce..203a10a6fe 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/NotificationSettingsFooterItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/NotificationSettingsFooterItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextWithColoredPart -@EpoxyModelClass(layout = R.layout.item_notifications_footer) -abstract class NotificationSettingsFooterItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class NotificationSettingsFooterItem : VectorEpoxyModel(R.layout.item_notifications_footer) { @EpoxyAttribute var encrypted: Boolean = false diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/RadioButtonItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/RadioButtonItem.kt index 128d34a6b0..b07ce5af4c 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/RadioButtonItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/RadioButtonItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setAttributeTintedImageResource -@EpoxyModelClass(layout = R.layout.item_radio) -abstract class RadioButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RadioButtonItem : VectorEpoxyModel(R.layout.item_radio) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/TextHeaderItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/TextHeaderItem.kt index 2dfe7be2e6..3302d02425 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/TextHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/notifications/TextHeaderItem.kt @@ -24,8 +24,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_text_header) -abstract class TextHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class TextHeaderItem : VectorEpoxyModel(R.layout.item_text_header) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetTitleItem.kt b/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetTitleItem.kt index 27fb634480..bd1a2baac2 100644 --- a/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetTitleItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetTitleItem.kt @@ -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. */ -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_title) -abstract class BottomSheetTitleItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetTitleItem : VectorEpoxyModel(R.layout.item_bottom_sheet_title) { @EpoxyAttribute lateinit var title: String diff --git a/vector/src/main/java/im/vector/app/core/ui/list/ButtonPositiveDestructiveButtonBarItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/ButtonPositiveDestructiveButtonBarItem.kt index 95c1a4457d..254458fcdc 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/ButtonPositiveDestructiveButtonBarItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/ButtonPositiveDestructiveButtonBarItem.kt @@ -28,8 +28,10 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence /** * A generic button list item. */ -@EpoxyModelClass(layout = R.layout.item_positive_destrutive_buttons) -abstract class ButtonPositiveDestructiveButtonBarItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ButtonPositiveDestructiveButtonBarItem : VectorEpoxyModel( + R.layout.item_positive_destrutive_buttons +) { @EpoxyAttribute var positiveText: EpoxyCharSequence? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericButtonItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericButtonItem.kt index d4838289a6..a3b6b40616 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericButtonItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericButtonItem.kt @@ -33,8 +33,8 @@ import im.vector.app.features.themes.ThemeUtils /** * A generic button list item. */ -@EpoxyModelClass(layout = R.layout.item_generic_button) -abstract class GenericButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericButtonItem : VectorEpoxyModel(R.layout.item_generic_button) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericEmptyWithActionItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericEmptyWithActionItem.kt index 4cc39af0a5..8ae45d3af1 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericEmptyWithActionItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericEmptyWithActionItem.kt @@ -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. */ -@EpoxyModelClass(layout = R.layout.item_generic_empty_state) -abstract class GenericEmptyWithActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericEmptyWithActionItem : VectorEpoxyModel(R.layout.item_generic_empty_state) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericFooterItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericFooterItem.kt index 6d7763cd48..a41ea0153c 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericFooterItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericFooterItem.kt @@ -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. * If provided with an action, will display a button at the bottom of the list item. */ -@EpoxyModelClass(layout = R.layout.item_generic_footer) -abstract class GenericFooterItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericFooterItem : VectorEpoxyModel(R.layout.item_generic_footer) { @EpoxyAttribute var text: EpoxyCharSequence? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericHeaderItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericHeaderItem.kt index b4b0211b91..2123b4c639 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericHeaderItem.kt @@ -28,8 +28,8 @@ import im.vector.app.features.themes.ThemeUtils /** * A generic list item header left aligned with notice color. */ -@EpoxyModelClass(layout = R.layout.item_generic_header) -abstract class GenericHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericHeaderItem : VectorEpoxyModel(R.layout.item_generic_header) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericItem.kt index 7b00001e4c..e9c4ebe0ee 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericItem.kt @@ -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. * If provided with an action, will display a button at the bottom of the list item. */ -@EpoxyModelClass(layout = R.layout.item_generic_list) -abstract class GenericItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericItem : VectorEpoxyModel(R.layout.item_generic_list) { @EpoxyAttribute var title: EpoxyCharSequence? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericLoaderItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericLoaderItem.kt index b458f10680..2077346442 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericLoaderItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericLoaderItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A generic list item header left aligned with notice color. */ -@EpoxyModelClass(layout = R.layout.item_generic_loader) -abstract class GenericLoaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericLoaderItem : VectorEpoxyModel(R.layout.item_generic_loader) { // Maybe/Later add some style configuration, SMALL/BIG ? diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericPillItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericPillItem.kt index a51c1b70ed..2a321ac4b0 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericPillItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericPillItem.kt @@ -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. */ -@EpoxyModelClass(layout = R.layout.item_generic_pill_footer) -abstract class GenericPillItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericPillItem : VectorEpoxyModel(R.layout.item_generic_pill_footer) { @EpoxyAttribute var text: EpoxyCharSequence? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericPositiveButtonItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericPositiveButtonItem.kt index 753b085d99..948f9036a7 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericPositiveButtonItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericPositiveButtonItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.onClick /** * A generic button list item. */ -@EpoxyModelClass(layout = R.layout.item_positive_button) -abstract class GenericPositiveButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericPositiveButtonItem : VectorEpoxyModel(R.layout.item_positive_button) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericProgressBarItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericProgressBarItem.kt index e392c0bdf2..8d2e55d198 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericProgressBarItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericProgressBarItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A generic progress bar item. */ -@EpoxyModelClass(layout = R.layout.item_generic_progress) -abstract class GenericProgressBarItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericProgressBarItem : VectorEpoxyModel(R.layout.item_generic_progress) { @EpoxyAttribute var progress: Int = 0 diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericWithValueItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/GenericWithValueItem.kt index e633b633a7..8b82bf4684 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericWithValueItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/GenericWithValueItem.kt @@ -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. * If provided with an action, will display a button at the bottom of the list item. */ -@EpoxyModelClass(layout = R.layout.item_generic_with_value) -abstract class GenericWithValueItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GenericWithValueItem : VectorEpoxyModel(R.layout.item_generic_with_value) { @EpoxyAttribute var title: EpoxyCharSequence? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt index ec99c7c215..ffb152ecff 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt +++ b/vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A generic item with empty space. */ -@EpoxyModelClass(layout = R.layout.item_vertical_margin) -abstract class VerticalMarginItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class VerticalMarginItem : VectorEpoxyModel(R.layout.item_vertical_margin) { @EpoxyAttribute var heightInPx: Int = 0 diff --git a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentPreviewItems.kt b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentPreviewItems.kt index ae18d2561d..0298b2da17 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentPreviewItems.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentPreviewItems.kt @@ -18,6 +18,7 @@ package im.vector.app.features.attachments.preview import android.view.View import android.widget.ImageView +import androidx.annotation.LayoutRes import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass @@ -29,7 +30,7 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.platform.CheckableImageView import org.matrix.android.sdk.api.session.content.ContentAttachmentData -abstract class AttachmentPreviewItem : VectorEpoxyModel() { +abstract class AttachmentPreviewItem(@LayoutRes layoutId: Int) : VectorEpoxyModel(layoutId) { abstract val attachment: ContentAttachmentData @@ -52,8 +53,8 @@ abstract class AttachmentPreviewItem : VectorE } } -@EpoxyModelClass(layout = R.layout.item_attachment_miniature_preview) -abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem() { +@EpoxyModelClass +abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem(R.layout.item_attachment_miniature_preview) { @EpoxyAttribute override lateinit var attachment: ContentAttachmentData @@ -78,8 +79,8 @@ abstract class AttachmentMiniaturePreviewItem : AttachmentPreviewItem() { +@EpoxyModelClass +abstract class AttachmentBigPreviewItem : AttachmentPreviewItem(R.layout.item_attachment_big_preview) { @EpoxyAttribute override lateinit var attachment: ContentAttachmentData diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteHeaderItem.kt b/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteHeaderItem.kt index f287104415..0f40ef761d 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteHeaderItem.kt @@ -23,8 +23,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_autocomplete_header_item) -abstract class AutocompleteHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class AutocompleteHeaderItem : VectorEpoxyModel(R.layout.item_autocomplete_header_item) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteMatrixItem.kt b/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteMatrixItem.kt index dba2661927..68668bcc6a 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/AutocompleteMatrixItem.kt @@ -30,8 +30,8 @@ import im.vector.app.features.displayname.getBestName import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_autocomplete_matrix_item) -abstract class AutocompleteMatrixItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class AutocompleteMatrixItem : VectorEpoxyModel(R.layout.item_autocomplete_matrix_item) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/command/AutocompleteCommandItem.kt b/vector/src/main/java/im/vector/app/features/autocomplete/command/AutocompleteCommandItem.kt index 2bd0cffbe6..78cf24f114 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/command/AutocompleteCommandItem.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/command/AutocompleteCommandItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_autocomplete_command) -abstract class AutocompleteCommandItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class AutocompleteCommandItem : VectorEpoxyModel(R.layout.item_autocomplete_command) { @EpoxyAttribute var name: String? = null diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiItem.kt b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiItem.kt index 6c18eb1c52..da881467a2 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiItem.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteEmojiItem.kt @@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide import im.vector.app.features.reactions.data.EmojiItem -@EpoxyModelClass(layout = R.layout.item_autocomplete_emoji) -abstract class AutocompleteEmojiItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class AutocompleteEmojiItem : VectorEpoxyModel(R.layout.item_autocomplete_emoji) { @EpoxyAttribute lateinit var emojiItem: EmojiItem diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteMoreResultItem.kt b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteMoreResultItem.kt index 6925b15c9a..be7bd1adc2 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteMoreResultItem.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/emoji/AutocompleteMoreResultItem.kt @@ -21,8 +21,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_autocomplete_more_result) -abstract class AutocompleteMoreResultItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class AutocompleteMoreResultItem : VectorEpoxyModel(R.layout.item_autocomplete_more_result) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/contactsbook/ContactDetailItem.kt b/vector/src/main/java/im/vector/app/features/contactsbook/ContactDetailItem.kt index fbf404b74d..434c2f5c44 100644 --- a/vector/src/main/java/im/vector/app/features/contactsbook/ContactDetailItem.kt +++ b/vector/src/main/java/im/vector/app/features/contactsbook/ContactDetailItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_contact_detail) -abstract class ContactDetailItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ContactDetailItem : VectorEpoxyModel(R.layout.item_contact_detail) { @EpoxyAttribute lateinit var threePid: String @EpoxyAttribute var matrixId: String? = null diff --git a/vector/src/main/java/im/vector/app/features/contactsbook/ContactItem.kt b/vector/src/main/java/im/vector/app/features/contactsbook/ContactItem.kt index fd112f0948..cd5322c4f8 100644 --- a/vector/src/main/java/im/vector/app/features/contactsbook/ContactItem.kt +++ b/vector/src/main/java/im/vector/app/features/contactsbook/ContactItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_contact_main) -abstract class ContactItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ContactItem : VectorEpoxyModel(R.layout.item_contact_main) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var mappedContact: MappedContact diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingFooterItem.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingFooterItem.kt index 69551cac93..cbca0c99eb 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingFooterItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingFooterItem.kt @@ -27,8 +27,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_keys_backup_settings_button_footer) -abstract class KeysBackupSettingFooterItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class KeysBackupSettingFooterItem : VectorEpoxyModel(R.layout.item_keys_backup_settings_button_footer) { @EpoxyAttribute var textButton1: String? = null diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetSelfWaitItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetSelfWaitItem.kt index 205dd6a10a..1f4a9f254b 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetSelfWaitItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetSelfWaitItem.kt @@ -24,7 +24,7 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_wait) -abstract class BottomSheetSelfWaitItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetSelfWaitItem : VectorEpoxyModel(R.layout.item_verification_wait) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationActionItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationActionItem.kt index 7dc7a31441..7a0d5ce69d 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationActionItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationActionItem.kt @@ -34,8 +34,8 @@ import im.vector.app.core.extensions.setTextOrHide /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_action) -abstract class BottomSheetVerificationActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationActionItem : VectorEpoxyModel(R.layout.item_verification_action) { @EpoxyAttribute @DrawableRes diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationBigImageItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationBigImageItem.kt index adf3e8f7e5..2fd88f7bca 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationBigImageItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationBigImageItem.kt @@ -27,8 +27,8 @@ import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_big_image) -abstract class BottomSheetVerificationBigImageItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationBigImageItem : VectorEpoxyModel(R.layout.item_verification_big_image) { @EpoxyAttribute lateinit var roomEncryptionTrustLevel: RoomEncryptionTrustLevel diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationDecimalCodeItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationDecimalCodeItem.kt index c8afc88769..052ad3b4bc 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationDecimalCodeItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationDecimalCodeItem.kt @@ -26,8 +26,10 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_decimal_code) -abstract class BottomSheetVerificationDecimalCodeItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationDecimalCodeItem : VectorEpoxyModel( + R.layout.item_verification_decimal_code +) { @EpoxyAttribute var code: String = "" diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt index e1b703e0fc..b591e27296 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt @@ -34,8 +34,8 @@ import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentatio /** * A emoji list for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_emojis) -abstract class BottomSheetVerificationEmojisItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationEmojisItem : VectorEpoxyModel(R.layout.item_verification_emojis) { @EpoxyAttribute lateinit var emojiRepresentation0: EmojiRepresentation @EpoxyAttribute lateinit var emojiRepresentation1: EmojiRepresentation diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationNoticeItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationNoticeItem.kt index ecd9989cdc..07f04b8ee2 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationNoticeItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationNoticeItem.kt @@ -27,8 +27,8 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_notice) -abstract class BottomSheetVerificationNoticeItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationNoticeItem : VectorEpoxyModel(R.layout.item_verification_notice) { @EpoxyAttribute lateinit var notice: EpoxyCharSequence diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationQrCodeItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationQrCodeItem.kt index 0041631986..8f20160108 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationQrCodeItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationQrCodeItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.ui.views.QrCodeImageView /** * An Epoxy item displaying a QR code. */ -@EpoxyModelClass(layout = R.layout.item_verification_qr_code) -abstract class BottomSheetVerificationQrCodeItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationQrCodeItem : VectorEpoxyModel(R.layout.item_verification_qr_code) { @EpoxyAttribute lateinit var data: String diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationWaitingItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationWaitingItem.kt index 46a1dd04a8..8c784cc7ac 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationWaitingItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationWaitingItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel /** * A action for bottom sheet. */ -@EpoxyModelClass(layout = R.layout.item_verification_waiting) -abstract class BottomSheetVerificationWaitingItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BottomSheetVerificationWaitingItem : VectorEpoxyModel(R.layout.item_verification_waiting) { @EpoxyAttribute var title: String = "" diff --git a/vector/src/main/java/im/vector/app/features/discovery/DiscoveryPolicyItem.kt b/vector/src/main/java/im/vector/app/features/discovery/DiscoveryPolicyItem.kt index 4df4146d2f..ef8c43aab4 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/DiscoveryPolicyItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/DiscoveryPolicyItem.kt @@ -19,15 +19,15 @@ package im.vector.app.features.discovery import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_discovery_policy) -abstract class DiscoveryPolicyItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class DiscoveryPolicyItem : VectorEpoxyModel(R.layout.item_discovery_policy) { @EpoxyAttribute var name: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsButtonItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsButtonItem.kt index c025779339..da432c43b1 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsButtonItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsButtonItem.kt @@ -19,17 +19,17 @@ import android.widget.Button import androidx.annotation.StringRes import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.onClick import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.resources.ColorProvider -@EpoxyModelClass(layout = R.layout.item_settings_button) -abstract class SettingsButtonItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsButtonItem : VectorEpoxyModel(R.layout.item_settings_button) { @EpoxyAttribute lateinit var colorProvider: ColorProvider diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsCenteredImageItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsCenteredImageItem.kt index af79dd8bb5..c8dd9fe304 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsCenteredImageItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsCenteredImageItem.kt @@ -19,12 +19,12 @@ import android.widget.ImageView import androidx.annotation.DrawableRes import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_settings_centered_image) -abstract class SettingsCenteredImageItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsCenteredImageItem : VectorEpoxyModel(R.layout.item_settings_centered_image) { @EpoxyAttribute @DrawableRes diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsContinueCancelItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsContinueCancelItem.kt index 1f19523202..cbb8794636 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsContinueCancelItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsContinueCancelItem.kt @@ -18,14 +18,14 @@ package im.vector.app.features.discovery import android.widget.Button import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_settings_continue_cancel) -abstract class SettingsContinueCancelItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsContinueCancelItem : VectorEpoxyModel(R.layout.item_settings_continue_cancel) { @EpoxyAttribute var continueText: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsEditTextItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsEditTextItem.kt index ad139309ac..ea2e51da24 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsEditTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsEditTextItem.kt @@ -22,15 +22,15 @@ import android.widget.TextView import androidx.core.widget.doOnTextChanged import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import com.google.android.material.textfield.TextInputLayout import im.vector.app.R 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.showKeyboard -@EpoxyModelClass(layout = R.layout.item_settings_edit_text) -abstract class SettingsEditTextItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsEditTextItem : VectorEpoxyModel(R.layout.item_settings_edit_text) { @EpoxyAttribute var hint: String? = null @EpoxyAttribute var value: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsInfoItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsInfoItem.kt index ea5f044274..b4b1a112ba 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsInfoItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsInfoItem.kt @@ -20,15 +20,15 @@ import androidx.annotation.DrawableRes import androidx.annotation.StringRes import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_settings_helper_info) -abstract class SettingsInfoItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsInfoItem : VectorEpoxyModel(R.layout.item_settings_helper_info) { @EpoxyAttribute var helperText: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsInformationItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsInformationItem.kt index 71eab5115e..aa98cfbe69 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsInformationItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsInformationItem.kt @@ -19,12 +19,12 @@ import android.widget.TextView import androidx.annotation.ColorInt import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_settings_information) -abstract class SettingsInformationItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsInformationItem : VectorEpoxyModel(R.layout.item_settings_information) { @EpoxyAttribute lateinit var message: String diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsItem.kt index 1a14b4c9f3..4d117067e6 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsItem.kt @@ -20,16 +20,16 @@ import androidx.annotation.StringRes import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import com.google.android.material.switchmaterial.SwitchMaterial import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_settings_simple_item) -abstract class SettingsItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsItem : VectorEpoxyModel(R.layout.item_settings_simple_item) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsProgressItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsProgressItem.kt index 8d62b37972..657ce9b10b 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsProgressItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsProgressItem.kt @@ -16,12 +16,12 @@ package im.vector.app.features.discovery import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_settings_progress) -abstract class SettingsProgressItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsProgressItem : VectorEpoxyModel(R.layout.item_settings_progress) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsSectionTitleItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsSectionTitleItem.kt index fe97984c8b..7e3e156d58 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsSectionTitleItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsSectionTitleItem.kt @@ -19,13 +19,13 @@ import android.widget.TextView import androidx.annotation.StringRes import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_settings_section_title) -abstract class SettingsSectionTitleItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsSectionTitleItem : VectorEpoxyModel(R.layout.item_settings_section_title) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/features/discovery/SettingsTextButtonSingleLineItem.kt b/vector/src/main/java/im/vector/app/features/discovery/SettingsTextButtonSingleLineItem.kt index 192ee404fb..9810ae2400 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/SettingsTextButtonSingleLineItem.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/SettingsTextButtonSingleLineItem.kt @@ -25,11 +25,11 @@ import androidx.core.view.isInvisible import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import com.google.android.material.switchmaterial.SwitchMaterial import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.ButtonType 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.features.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_settings_button_single_line) -abstract class SettingsTextButtonSingleLineItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class SettingsTextButtonSingleLineItem : VectorEpoxyModel(R.layout.item_settings_button_single_line) { @EpoxyAttribute lateinit var colorProvider: ColorProvider diff --git a/vector/src/main/java/im/vector/app/features/form/FormAdvancedToggleItem.kt b/vector/src/main/java/im/vector/app/features/form/FormAdvancedToggleItem.kt index d50b429c97..6f2aa2086b 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormAdvancedToggleItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormAdvancedToggleItem.kt @@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.features.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_form_advanced_toggle) -abstract class FormAdvancedToggleItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormAdvancedToggleItem : VectorEpoxyModel(R.layout.item_form_advanced_toggle) { @EpoxyAttribute lateinit var title: String @EpoxyAttribute var expanded: Boolean = false diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditTextItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditTextItem.kt index c58b36fc88..9f32980874 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditTextItem.kt @@ -34,8 +34,8 @@ import im.vector.app.core.epoxy.addTextChangedListenerOnce import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.platform.SimpleTextWatcher -@EpoxyModelClass(layout = R.layout.item_form_text_input) -abstract class FormEditTextItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormEditTextItem : VectorEpoxyModel(R.layout.item_form_text_input) { @EpoxyAttribute var hint: String? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithButtonItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithButtonItem.kt index dd059ec658..011446a020 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithButtonItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithButtonItem.kt @@ -32,8 +32,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.platform.SimpleTextWatcher -@EpoxyModelClass(layout = R.layout.item_form_text_input_with_button) -abstract class FormEditTextWithButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormEditTextWithButtonItem : VectorEpoxyModel(R.layout.item_form_text_input_with_button) { @EpoxyAttribute var hint: String? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt index 637955a66c..64feca87f7 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt @@ -34,8 +34,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextIfDifferent import im.vector.app.core.platform.SimpleTextWatcher -@EpoxyModelClass(layout = R.layout.item_form_text_input_with_delete) -abstract class FormEditTextWithDeleteItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormEditTextWithDeleteItem : VectorEpoxyModel(R.layout.item_form_text_input_with_delete) { @EpoxyAttribute var hint: String? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditableAvatarItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditableAvatarItem.kt index b81a731260..75b9379903 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditableAvatarItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditableAvatarItem.kt @@ -21,18 +21,18 @@ import android.widget.ImageView import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import com.bumptech.glide.request.RequestOptions import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.glide.GlideApp import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_editable_avatar) -abstract class FormEditableAvatarItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class FormEditableAvatarItem : VectorEpoxyModel(R.layout.item_editable_avatar) { @EpoxyAttribute var avatarRenderer: AvatarRenderer? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditableSquareAvatarItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditableSquareAvatarItem.kt index a25050cad0..1533f8f22c 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditableSquareAvatarItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditableSquareAvatarItem.kt @@ -22,20 +22,20 @@ import android.widget.ImageView import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import com.bumptech.glide.load.MultiTransformation import com.bumptech.glide.load.resource.bitmap.CenterCrop import com.bumptech.glide.load.resource.bitmap.RoundedCorners import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.glide.GlideApp import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_editable_square_avatar) -abstract class FormEditableSquareAvatarItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class FormEditableSquareAvatarItem : VectorEpoxyModel(R.layout.item_editable_square_avatar) { @EpoxyAttribute var avatarRenderer: AvatarRenderer? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormMultiLineEditTextItem.kt b/vector/src/main/java/im/vector/app/features/form/FormMultiLineEditTextItem.kt index 0753248272..7080f6d001 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormMultiLineEditTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormMultiLineEditTextItem.kt @@ -30,8 +30,8 @@ import im.vector.app.core.epoxy.addTextChangedListenerOnce import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.platform.SimpleTextWatcher -@EpoxyModelClass(layout = R.layout.item_form_multiline_text_input) -abstract class FormMultiLineEditTextItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormMultiLineEditTextItem : VectorEpoxyModel(R.layout.item_form_multiline_text_input) { @EpoxyAttribute var hint: String? = null diff --git a/vector/src/main/java/im/vector/app/features/form/FormSubmitButtonItem.kt b/vector/src/main/java/im/vector/app/features/form/FormSubmitButtonItem.kt index 41e1bc95a7..d425111fec 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormSubmitButtonItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormSubmitButtonItem.kt @@ -19,15 +19,15 @@ import android.widget.Button import androidx.annotation.StringRes import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_form_submit_button) -abstract class FormSubmitButtonItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class FormSubmitButtonItem : VectorEpoxyModel(R.layout.item_form_submit_button) { @EpoxyAttribute var enabled: Boolean = true diff --git a/vector/src/main/java/im/vector/app/features/form/FormSwitchItem.kt b/vector/src/main/java/im/vector/app/features/form/FormSwitchItem.kt index 800a90135b..00d1738aaf 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormSwitchItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormSwitchItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_form_switch) -abstract class FormSwitchItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FormSwitchItem : VectorEpoxyModel(R.layout.item_form_switch) { @EpoxyAttribute var listener: ((Boolean) -> Unit)? = null diff --git a/vector/src/main/java/im/vector/app/features/grouplist/GroupSummaryItem.kt b/vector/src/main/java/im/vector/app/features/grouplist/GroupSummaryItem.kt index 4256e2d808..ce2b35b353 100644 --- a/vector/src/main/java/im/vector/app/features/grouplist/GroupSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/grouplist/GroupSummaryItem.kt @@ -30,8 +30,8 @@ import im.vector.app.core.platform.CheckableConstraintLayout import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_group) -abstract class GroupSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class GroupSummaryItem : VectorEpoxyModel(R.layout.item_group) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/grouplist/HomeSpaceSummaryItem.kt b/vector/src/main/java/im/vector/app/features/grouplist/HomeSpaceSummaryItem.kt index bd414c0c3f..816b9acb24 100644 --- a/vector/src/main/java/im/vector/app/features/grouplist/HomeSpaceSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/grouplist/HomeSpaceSummaryItem.kt @@ -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.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_space) -abstract class HomeSpaceSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class HomeSpaceSummaryItem : VectorEpoxyModel(R.layout.item_space) { @EpoxyAttribute var selected: Boolean = false @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/breadcrumbs/BreadcrumbsItem.kt b/vector/src/main/java/im/vector/app/features/home/room/breadcrumbs/BreadcrumbsItem.kt index 52996c74de..cfc9b124d7 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/breadcrumbs/BreadcrumbsItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/breadcrumbs/BreadcrumbsItem.kt @@ -32,8 +32,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.list.UnreadCounterBadgeView import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_breadcrumbs) -abstract class BreadcrumbsItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BreadcrumbsItem : VectorEpoxyModel(R.layout.item_breadcrumbs) { @EpoxyAttribute var hasTypingUsers: Boolean = false @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptItem.kt index 9e3cbef1cc..a489c1ec66 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptItem.kt @@ -21,17 +21,17 @@ import android.widget.TextView import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.features.displayname.getBestName import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_display_read_receipt) -abstract class DisplayReadReceiptItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class DisplayReadReceiptItem : VectorEpoxyModel(R.layout.item_display_read_receipt) { @EpoxyAttribute lateinit var matrixItem: MatrixItem @EpoxyAttribute var timestamp: String? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/search/SearchResultItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/search/SearchResultItem.kt index d92dcdd3ef..60cbf1311a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/search/SearchResultItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/search/SearchResultItem.kt @@ -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.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_search_result) -abstract class SearchResultItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SearchResultItem : VectorEpoxyModel(R.layout.item_search_result) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute var formattedDate: String? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsBaseMessageItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsBaseMessageItem.kt index e3471b22f8..5e23f4db16 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsBaseMessageItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsBaseMessageItem.kt @@ -23,6 +23,7 @@ import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView import androidx.annotation.IdRes +import androidx.annotation.LayoutRes import androidx.appcompat.view.ContextThemeWrapper import androidx.core.content.ContextCompat.getDrawable import androidx.core.view.isVisible @@ -49,7 +50,7 @@ private const val MAX_REACTIONS_TO_SHOW = 8 * Manages associated click listeners and send status. * Should not be used as this, use a subclass. */ -abstract class AbsBaseMessageItem : BaseEventItem() { +abstract class AbsBaseMessageItem(@LayoutRes layoutId: Int) : BaseEventItem(layoutId) { abstract val baseAttributes: Attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt index 24a148885f..8dba0117b5 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -24,6 +24,7 @@ import android.widget.ProgressBar import android.widget.RelativeLayout import android.widget.TextView import androidx.annotation.IdRes +import androidx.annotation.LayoutRes import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.isVisible import androidx.core.view.updateLayoutParams @@ -42,7 +43,9 @@ 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. * Adds associated click listeners (on avatar, displayname). */ -abstract class AbsMessageItem : AbsBaseMessageItem() { +abstract class AbsMessageItem( + @LayoutRes layoutId: Int = R.layout.item_timeline_event_base +) : AbsBaseMessageItem(layoutId) { override val baseAttributes: AbsBaseMessageItem.Attributes get() = attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageLocationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageLocationItem.kt index ee3a9f6746..b7790b8a30 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageLocationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageLocationItem.kt @@ -20,6 +20,7 @@ import android.graphics.drawable.Drawable import android.widget.ImageView import android.widget.TextView import androidx.annotation.IdRes +import androidx.annotation.LayoutRes import androidx.core.view.isVisible import androidx.core.view.updateLayoutParams import com.airbnb.epoxy.EpoxyAttribute @@ -36,7 +37,9 @@ 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.granularRoundedCorners -abstract class AbsMessageLocationItem : AbsMessageItem() { +abstract class AbsMessageLocationItem( + @LayoutRes layoutId: Int = R.layout.item_timeline_event_base +) : AbsMessageItem(layoutId) { @EpoxyAttribute var locationUrl: String? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BaseEventItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BaseEventItem.kt index b72f492c8c..0a627ee500 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BaseEventItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BaseEventItem.kt @@ -20,6 +20,7 @@ import android.view.ViewStub import android.widget.RelativeLayout import androidx.annotation.CallSuper import androidx.annotation.IdRes +import androidx.annotation.LayoutRes import androidx.core.view.updateLayoutParams import com.airbnb.epoxy.EpoxyAttribute import im.vector.app.R @@ -30,7 +31,7 @@ import im.vector.app.core.platform.CheckableView /** * Children must override getViewType(). */ -abstract class BaseEventItem : VectorEpoxyModel(), ItemWithEvents { +abstract class BaseEventItem(@LayoutRes layoutId: Int) : VectorEpoxyModel(layoutId), ItemWithEvents { // To use for instance when opening a permalink with an eventId @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BasedMergedItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BasedMergedItem.kt index 1c56a0809e..43f81b4d05 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BasedMergedItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BasedMergedItem.kt @@ -19,11 +19,12 @@ package im.vector.app.features.home.room.detail.timeline.item import android.view.View import android.widget.TextView import androidx.annotation.IdRes +import androidx.annotation.LayoutRes import im.vector.app.R import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -abstract class BasedMergedItem : BaseEventItem() { +abstract class BasedMergedItem(@LayoutRes layoutId: Int) : BaseEventItem(layoutId) { abstract val attributes: Attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BlankItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BlankItem.kt index cf3e4a8328..bcb95f0414 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BlankItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BlankItem.kt @@ -20,7 +20,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_timeline_event_blank_stub) -abstract class BlankItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class BlankItem : VectorEpoxyModel(R.layout.item_timeline_event_blank_stub) { class BlankHolder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt index 228e0181d2..58d267fb0e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt @@ -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 org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_state) -abstract class CallTileTimelineItem : AbsBaseMessageItem() { +@EpoxyModelClass +abstract class CallTileTimelineItem : AbsBaseMessageItem(R.layout.item_timeline_event_base_state) { override val baseAttributes: AbsBaseMessageItem.Attributes get() = attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DaySeparatorItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DaySeparatorItem.kt index 4c9664e612..d23081bcad 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DaySeparatorItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DaySeparatorItem.kt @@ -19,12 +19,12 @@ package im.vector.app.features.home.room.detail.timeline.item import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_timeline_event_day_separator) -abstract class DaySeparatorItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class DaySeparatorItem : VectorEpoxyModel(R.layout.item_timeline_event_day_separator) { @EpoxyAttribute lateinit var formattedDay: String diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultItem.kt index 9d437754d0..9bc42dca28 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultItem.kt @@ -24,8 +24,8 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class DefaultItem : BaseEventItem() { +@EpoxyModelClass +abstract class DefaultItem : BaseEventItem(R.layout.item_timeline_event_base_noinfo) { @EpoxyAttribute lateinit var attributes: Attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedRoomCreationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedRoomCreationItem.kt index f41c17d9e7..0483c3914b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedRoomCreationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedRoomCreationItem.kt @@ -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.util.toMatrixItem -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class MergedRoomCreationItem : BasedMergedItem() { +@EpoxyModelClass +abstract class MergedRoomCreationItem : BasedMergedItem(R.layout.item_timeline_event_base_noinfo) { @EpoxyAttribute override lateinit var attributes: Attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedSimilarEventsItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedSimilarEventsItem.kt index f012ca6cdc..60d7eb4aba 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedSimilarEventsItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MergedSimilarEventsItem.kt @@ -27,8 +27,8 @@ import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class MergedSimilarEventsItem : BasedMergedItem() { +@EpoxyModelClass +abstract class MergedSimilarEventsItem : BasedMergedItem(R.layout.item_timeline_event_base_noinfo) { override fun getViewStubId() = STUB_ID diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt index a3c09960c9..7153c0f442 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt @@ -37,7 +37,7 @@ 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.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageAudioItem : AbsMessageItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageFileItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageFileItem.kt index 8a94f927f9..2224d9ac3b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageFileItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageFileItem.kt @@ -34,7 +34,7 @@ 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.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageFileItem : AbsMessageItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageImageVideoItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageImageVideoItem.kt index f3ab0e838b..910776f5d7 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageImageVideoItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageImageVideoItem.kt @@ -36,7 +36,7 @@ import im.vector.app.features.home.room.detail.timeline.style.granularRoundedCor import im.vector.app.features.media.ImageContentRenderer import org.matrix.android.sdk.api.session.room.model.message.MessageType -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageImageVideoItem : AbsMessageItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationInactiveItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationInactiveItem.kt index bb85316bf1..bc6e96b0ee 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationInactiveItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationInactiveItem.kt @@ -21,7 +21,7 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageLiveLocationInactiveItem : AbsMessageItem(), LiveLocationShareStatusItem by DefaultLiveLocationShareStatusItem() { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt index 795bd21cb2..84080eaad9 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationItem.kt @@ -30,7 +30,7 @@ import im.vector.app.features.location.live.LocationLiveMessageBannerView import im.vector.app.features.location.live.LocationLiveMessageBannerViewState import org.threeten.bp.LocalDateTime -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageLiveLocationItem : AbsMessageLocationItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationStartItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationStartItem.kt index 001774b579..a847c24f57 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationStartItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLiveLocationStartItem.kt @@ -21,7 +21,7 @@ import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageLiveLocationStartItem : AbsMessageItem(), LiveLocationShareStatusItem by DefaultLiveLocationShareStatusItem() { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLocationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLocationItem.kt index 37f728407b..b5f513fbe9 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLocationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageLocationItem.kt @@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.item import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageLocationItem : AbsMessageLocationItem() { override fun getViewStubId() = STUB_ID diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt index bc9e4a7ff1..d63d29553d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt @@ -37,7 +37,7 @@ import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence import io.noties.markwon.MarkwonPlugin import org.matrix.android.sdk.api.extensions.orFalse -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageTextItem : AbsMessageItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt index e8f1762963..e98d8115e6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt @@ -37,7 +37,7 @@ import im.vector.app.features.home.room.detail.timeline.style.TimelineMessageLay import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.voice.AudioWaveformView -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class MessageVoiceItem : AbsMessageItem() { interface WaveformTouchListener { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/NoticeItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/NoticeItem.kt index 9d865e6dad..ad62249459 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/NoticeItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/NoticeItem.kt @@ -30,8 +30,8 @@ import im.vector.app.features.home.room.detail.timeline.TimelineEventController import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_noinfo) -abstract class NoticeItem : BaseEventItem() { +@EpoxyModelClass +abstract class NoticeItem : BaseEventItem(R.layout.item_timeline_event_base_noinfo) { @EpoxyAttribute lateinit var attributes: Attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt index 273dd0299a..d00a66b225 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/PollItem.kt @@ -26,7 +26,7 @@ import im.vector.app.features.home.room.detail.RoomDetailAction import im.vector.app.features.home.room.detail.timeline.TimelineEventController import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class PollItem : AbsMessageItem() { @EpoxyAttribute diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/ReadReceiptsItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/ReadReceiptsItem.kt index 4f29253264..658aef0649 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/ReadReceiptsItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/ReadReceiptsItem.kt @@ -19,16 +19,16 @@ package im.vector.app.features.home.room.detail.timeline.item import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.ui.views.ReadReceiptsView import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_timeline_event_read_receipts) -abstract class ReadReceiptsItem : EpoxyModelWithHolder(), ItemWithEvents { +@EpoxyModelClass +abstract class ReadReceiptsItem : VectorEpoxyModel(R.layout.item_timeline_event_read_receipts), ItemWithEvents { @EpoxyAttribute lateinit var eventId: String @EpoxyAttribute lateinit var readReceipts: List diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RedactedMessageItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RedactedMessageItem.kt index 204bab2254..057a9bad0e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RedactedMessageItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RedactedMessageItem.kt @@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.item import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -@EpoxyModelClass(layout = R.layout.item_timeline_event_base) +@EpoxyModelClass abstract class RedactedMessageItem : AbsMessageItem() { override fun getViewStubId() = STUB_ID diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RoomCreateItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RoomCreateItem.kt index a6d2bcc66d..394079ed5f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RoomCreateItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/RoomCreateItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence import me.saket.bettermovementmethod.BetterLinkMovementMethod -@EpoxyModelClass(layout = R.layout.item_timeline_event_create) -abstract class RoomCreateItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomCreateItem : VectorEpoxyModel(R.layout.item_timeline_event_create) { @EpoxyAttribute lateinit var text: EpoxyCharSequence diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt index e4c68a7a5b..c4dd4bedeb 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt @@ -31,8 +31,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.detail.timeline.MessageColorProvider import im.vector.app.features.home.room.detail.timeline.TimelineEventController -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_state) -abstract class StatusTileTimelineItem : AbsBaseMessageItem() { +@EpoxyModelClass +abstract class StatusTileTimelineItem : AbsBaseMessageItem(R.layout.item_timeline_event_base_state) { override val baseAttributes: AbsBaseMessageItem.Attributes get() = attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/TimelineReadMarkerItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/TimelineReadMarkerItem.kt index 106f178216..700a8d6e2c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/TimelineReadMarkerItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/TimelineReadMarkerItem.kt @@ -21,8 +21,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_timeline_read_marker) -abstract class TimelineReadMarkerItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class TimelineReadMarkerItem : VectorEpoxyModel(R.layout.item_timeline_read_marker) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/VerificationRequestItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/VerificationRequestItem.kt index 395b5fa308..1abed2031d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/VerificationRequestItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/VerificationRequestItem.kt @@ -39,8 +39,8 @@ import im.vector.app.features.home.room.detail.timeline.TimelineEventController import org.matrix.android.sdk.api.session.crypto.verification.VerificationService import org.matrix.android.sdk.api.session.crypto.verification.VerificationState -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_state) -abstract class VerificationRequestItem : AbsBaseMessageItem() { +@EpoxyModelClass +abstract class VerificationRequestItem : AbsBaseMessageItem(R.layout.item_timeline_event_base_state) { override val baseAttributes: AbsBaseMessageItem.Attributes get() = attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/WidgetTileTimelineItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/WidgetTileTimelineItem.kt index a3a84910f5..5a73a20aa3 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/WidgetTileTimelineItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/WidgetTileTimelineItem.kt @@ -32,8 +32,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.detail.timeline.MessageColorProvider import im.vector.app.features.home.room.detail.timeline.TimelineEventController -@EpoxyModelClass(layout = R.layout.item_timeline_event_base_state) -abstract class WidgetTileTimelineItem : AbsBaseMessageItem() { +@EpoxyModelClass +abstract class WidgetTileTimelineItem : AbsBaseMessageItem(R.layout.item_timeline_event_base_state) { override val baseAttributes: AbsBaseMessageItem.Attributes get() = attributes diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/reactions/ReactionInfoSimpleItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/reactions/ReactionInfoSimpleItem.kt index 741cb1324f..b4501c3807 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/reactions/ReactionInfoSimpleItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/reactions/ReactionInfoSimpleItem.kt @@ -20,18 +20,18 @@ import android.widget.TextView import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.lib.core.utils.epoxy.charsequence.EpoxyCharSequence /** * Item displaying an emoji reaction (single line with emoji, author, time). */ -@EpoxyModelClass(layout = R.layout.item_simple_reaction_info) -abstract class ReactionInfoSimpleItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class ReactionInfoSimpleItem : VectorEpoxyModel(R.layout.item_simple_reaction_info) { @EpoxyAttribute lateinit var reactionKey: EpoxyCharSequence diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetItem.kt index 4ffc81fc1e..210ce9cfca 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetItem.kt @@ -22,17 +22,17 @@ import androidx.annotation.DrawableRes import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.session.widgets.model.Widget import java.net.URL -@EpoxyModelClass(layout = R.layout.item_room_widget) -abstract class RoomWidgetItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class RoomWidgetItem : VectorEpoxyModel(R.layout.item_room_widget) { @EpoxyAttribute lateinit var widget: Widget @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var widgetClicked: ClickListener? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomFooterItem.kt b/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomFooterItem.kt index 4c163f2f56..7994240ec0 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomFooterItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomFooterItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_room_filter_footer) -abstract class FilteredRoomFooterItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class FilteredRoomFooterItem : VectorEpoxyModel(R.layout.item_room_filter_footer) { @EpoxyAttribute var listener: Listener? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomCategoryItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomCategoryItem.kt index 6057072e41..a7804bd049 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomCategoryItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomCategoryItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.features.themes.ThemeUtils -@EpoxyModelClass(layout = R.layout.item_room_category) -abstract class RoomCategoryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomCategoryItem : VectorEpoxyModel(R.layout.item_room_category) { @EpoxyAttribute lateinit var title: String @EpoxyAttribute var itemCount: Int = 0 diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomInvitationItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomInvitationItem.kt index 28cc9a9bd0..581361addd 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomInvitationItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomInvitationItem.kt @@ -34,8 +34,8 @@ import im.vector.app.features.invite.InviteButtonStateBinder import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_room_invitation) -abstract class RoomInvitationItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomInvitationItem : VectorEpoxyModel(R.layout.item_room_invitation) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt index 046d90c512..8dc0ac0784 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItem.kt @@ -43,8 +43,8 @@ import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel import org.matrix.android.sdk.api.session.presence.model.UserPresence import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_room) -abstract class RoomSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomSummaryItem : VectorEpoxyModel(R.layout.item_room) { @EpoxyAttribute lateinit var typingMessage: String diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemCentered.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemCentered.kt index 8f2d949178..440df0952c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemCentered.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemCentered.kt @@ -40,8 +40,8 @@ import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel import org.matrix.android.sdk.api.session.presence.model.UserPresence import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_room_centered) -abstract class RoomSummaryItemCentered : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomSummaryItemCentered : VectorEpoxyModel(R.layout.item_room_centered) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemPlaceHolder.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemPlaceHolder.kt index 96d8f6418b..d4683f78a5 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemPlaceHolder.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomSummaryItemPlaceHolder.kt @@ -21,7 +21,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_room_placeholder) -abstract class RoomSummaryItemPlaceHolder : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomSummaryItemPlaceHolder : VectorEpoxyModel(R.layout.item_room_placeholder) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt index a2cb905f1b..964a39fb0f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt @@ -40,8 +40,8 @@ import me.gujun.android.span.image import me.gujun.android.span.span import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_explore_space_child) -abstract class SpaceChildInfoItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceChildInfoItem : VectorEpoxyModel(R.layout.item_explore_space_child) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceDirectoryFilterNoResults.kt b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceDirectoryFilterNoResults.kt index 1ae017c98c..6899b59f38 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceDirectoryFilterNoResults.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceDirectoryFilterNoResults.kt @@ -21,7 +21,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_space_directory_filter_no_results) -abstract class SpaceDirectoryFilterNoResults : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceDirectoryFilterNoResults : VectorEpoxyModel(R.layout.item_space_directory_filter_no_results) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/home/room/threads/list/model/ThreadListItem.kt b/vector/src/main/java/im/vector/app/features/home/room/threads/list/model/ThreadListItem.kt index d5a6b72a1b..6284a1a067 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/threads/list/model/ThreadListItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/threads/list/model/ThreadListItem.kt @@ -37,8 +37,8 @@ import im.vector.app.features.themes.ThemeUtils import org.matrix.android.sdk.api.session.threads.ThreadNotificationState import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_thread) -abstract class ThreadListItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ThreadListItem : VectorEpoxyModel(R.layout.item_thread) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationBottomSheetController.kt b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationBottomSheetController.kt index c07104e72c..e8a6b22b7e 100644 --- a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationBottomSheetController.kt +++ b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationBottomSheetController.kt @@ -26,8 +26,6 @@ import im.vector.app.core.resources.StringProvider import im.vector.app.core.resources.toTimestamp import im.vector.app.core.time.Clock import im.vector.app.features.home.AvatarRenderer -import im.vector.app.features.location.live.map.bottomsheet.LiveLocationUserItem -import im.vector.app.features.location.live.map.bottomsheet.liveLocationUserItem import javax.inject.Inject class LiveLocationBottomSheetController @Inject constructor( diff --git a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationUserItem.kt b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationUserItem.kt index 336f688434..0a4742fafc 100644 --- a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationUserItem.kt +++ b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationUserItem.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.app.features.location.live.map.bottomsheet +package im.vector.app.features.location.live.map import android.widget.Button import android.widget.ImageView @@ -34,8 +34,8 @@ import im.vector.lib.core.utils.timer.CountUpTimer import org.matrix.android.sdk.api.util.MatrixItem import org.threeten.bp.Duration -@EpoxyModelClass(layout = R.layout.item_live_location_users_bottom_sheet) -abstract class LiveLocationUserItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LiveLocationUserItem : VectorEpoxyModel(R.layout.item_live_location_users_bottom_sheet) { interface Callback { fun onUserSelected(userId: String) diff --git a/vector/src/main/java/im/vector/app/features/login/terms/PolicyItem.kt b/vector/src/main/java/im/vector/app/features/login/terms/PolicyItem.kt index ff35f912cf..f35de49ecc 100644 --- a/vector/src/main/java/im/vector/app/features/login/terms/PolicyItem.kt +++ b/vector/src/main/java/im/vector/app/features/login/terms/PolicyItem.kt @@ -21,15 +21,15 @@ import android.widget.CompoundButton import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setHorizontalPadding -@EpoxyModelClass(layout = R.layout.item_policy) -abstract class PolicyItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class PolicyItem : VectorEpoxyModel(R.layout.item_policy) { @EpoxyAttribute var checked: Boolean = false diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/SplashCarouselItem.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/SplashCarouselItem.kt index dc56820424..24f8fc5f45 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/SplashCarouselItem.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/SplashCarouselItem.kt @@ -24,8 +24,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_splash_carousel) -abstract class SplashCarouselItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SplashCarouselItem : VectorEpoxyModel(R.layout.item_splash_carousel) { @EpoxyAttribute lateinit var item: SplashCarouselState.Item diff --git a/vector/src/main/java/im/vector/app/features/poll/create/PollTypeSelectionItem.kt b/vector/src/main/java/im/vector/app/features/poll/create/PollTypeSelectionItem.kt index 8232e2ebb9..daa7f0e907 100644 --- a/vector/src/main/java/im/vector/app/features/poll/create/PollTypeSelectionItem.kt +++ b/vector/src/main/java/im/vector/app/features/poll/create/PollTypeSelectionItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import org.matrix.android.sdk.api.session.room.model.message.PollType -@EpoxyModelClass(layout = R.layout.item_poll_type_selection) -abstract class PollTypeSelectionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class PollTypeSelectionItem : VectorEpoxyModel(R.layout.item_poll_type_selection) { @EpoxyAttribute var pollType: PollType = PollType.DISCLOSED_UNSTABLE diff --git a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultItem.kt b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultItem.kt index 32a8be9460..8fa897a2e0 100644 --- a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultItem.kt +++ b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultItem.kt @@ -19,16 +19,16 @@ import android.graphics.Typeface import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener 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.extensions.setTextOrHide import im.vector.app.features.reactions.data.EmojiItem -@EpoxyModelClass(layout = R.layout.item_emoji_result) -abstract class EmojiSearchResultItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class EmojiSearchResultItem : VectorEpoxyModel(R.layout.item_emoji_result) { @EpoxyAttribute lateinit var emojiItem: EmojiItem diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomItem.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomItem.kt index ff1bcb6c97..e542277d4c 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/PublicRoomItem.kt @@ -31,8 +31,8 @@ import im.vector.app.core.platform.ButtonStateView import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_public_room) -abstract class PublicRoomItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class PublicRoomItem : VectorEpoxyModel(R.layout.item_public_room) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/UnknownRoomItem.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/UnknownRoomItem.kt index 1383aec54b..a22c5791a3 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/UnknownRoomItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/UnknownRoomItem.kt @@ -29,8 +29,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_unknown_room) -abstract class UnknownRoomItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UnknownRoomItem : VectorEpoxyModel(R.layout.item_unknown_room) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryItem.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryItem.kt index e898bb2230..f9b77ba8f1 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryItem.kt @@ -32,8 +32,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.glide.GlideApp -@EpoxyModelClass(layout = R.layout.item_room_directory) -abstract class RoomDirectoryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomDirectoryItem : VectorEpoxyModel(R.layout.item_room_directory) { @EpoxyAttribute var directoryAvatarUrl: String? = null diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryServerItem.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryServerItem.kt index 572f732369..d65a35c200 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryServerItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryServerItem.kt @@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_room_directory_server) -abstract class RoomDirectoryServerItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomDirectoryServerItem : VectorEpoxyModel(R.layout.item_room_directory_server) { @EpoxyAttribute var serverName: String? = null diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/SpaceJoinRuleItem.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/SpaceJoinRuleItem.kt index 382ef1c545..eaba1a5fef 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/SpaceJoinRuleItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/SpaceJoinRuleItem.kt @@ -33,8 +33,8 @@ import im.vector.app.core.utils.DebouncedClickListener import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_bottom_sheet_joinrule_restricted) -abstract class SpaceJoinRuleItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceJoinRuleItem : VectorEpoxyModel(R.layout.item_bottom_sheet_joinrule_restricted) { @EpoxyAttribute var selected: Boolean = false diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/files/UploadsFileItem.kt b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/files/UploadsFileItem.kt index 6b75209224..eeef076312 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/files/UploadsFileItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/files/UploadsFileItem.kt @@ -25,8 +25,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_uploads_file) -abstract class UploadsFileItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UploadsFileItem : VectorEpoxyModel(R.layout.item_uploads_file) { @EpoxyAttribute var title: String? = null @EpoxyAttribute var subtitle: String? = null diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsImageItem.kt b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsImageItem.kt index c4ee807b06..12be88ffa6 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsImageItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsImageItem.kt @@ -27,8 +27,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.features.media.ImageContentRenderer -@EpoxyModelClass(layout = R.layout.item_uploads_image) -abstract class UploadsImageItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UploadsImageItem : VectorEpoxyModel(R.layout.item_uploads_image) { @EpoxyAttribute lateinit var imageContentRenderer: ImageContentRenderer @EpoxyAttribute lateinit var data: ImageContentRenderer.Data diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsVideoItem.kt b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsVideoItem.kt index e2f0d6eee9..fdc69f0d8f 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsVideoItem.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/media/UploadsVideoItem.kt @@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.features.media.ImageContentRenderer import im.vector.app.features.media.VideoContentRenderer -@EpoxyModelClass(layout = R.layout.item_uploads_video) -abstract class UploadsVideoItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UploadsVideoItem : VectorEpoxyModel(R.layout.item_uploads_video) { @EpoxyAttribute lateinit var imageContentRenderer: ImageContentRenderer @EpoxyAttribute lateinit var data: VideoContentRenderer.Data diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/DeviceItem.kt b/vector/src/main/java/im/vector/app/features/settings/devices/DeviceItem.kt index b0f6261424..6486b8a3ca 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/DeviceItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/DeviceItem.kt @@ -37,8 +37,8 @@ import org.matrix.android.sdk.api.session.crypto.model.DeviceInfo /** * A list item for Device. */ -@EpoxyModelClass(layout = R.layout.item_device) -abstract class DeviceItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class DeviceItem : VectorEpoxyModel(R.layout.item_device) { @EpoxyAttribute lateinit var deviceInfo: DeviceInfo diff --git a/vector/src/main/java/im/vector/app/features/settings/ignored/UserItem.kt b/vector/src/main/java/im/vector/app/features/settings/ignored/UserItem.kt index bb27a8be36..ec02148aca 100644 --- a/vector/src/main/java/im/vector/app/features/settings/ignored/UserItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/ignored/UserItem.kt @@ -32,8 +32,8 @@ import org.matrix.android.sdk.api.util.MatrixItem /** * A list item for User. */ -@EpoxyModelClass(layout = R.layout.item_user) -abstract class UserItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UserItem : VectorEpoxyModel(R.layout.item_user) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer diff --git a/vector/src/main/java/im/vector/app/features/settings/locale/LocaleItem.kt b/vector/src/main/java/im/vector/app/features/settings/locale/LocaleItem.kt index c74fb7c5cf..2478ae4cea 100644 --- a/vector/src/main/java/im/vector/app/features/settings/locale/LocaleItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/locale/LocaleItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_locale) -abstract class LocaleItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LocaleItem : VectorEpoxyModel(R.layout.item_locale) { @EpoxyAttribute var title: String? = null @EpoxyAttribute var subtitle: String? = null diff --git a/vector/src/main/java/im/vector/app/features/settings/push/PushGatewayItem.kt b/vector/src/main/java/im/vector/app/features/settings/push/PushGatewayItem.kt index 03eb581b7f..5ef6e02330 100644 --- a/vector/src/main/java/im/vector/app/features/settings/push/PushGatewayItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/push/PushGatewayItem.kt @@ -20,14 +20,14 @@ import android.view.View import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide import org.matrix.android.sdk.api.session.pushers.Pusher -@EpoxyModelClass(layout = R.layout.item_pushgateway) -abstract class PushGatewayItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class PushGatewayItem : VectorEpoxyModel(R.layout.item_pushgateway) { @EpoxyAttribute lateinit var pusher: Pusher diff --git a/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt b/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt index d56562a7dd..5a1dd055bd 100644 --- a/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt @@ -25,16 +25,16 @@ import androidx.core.view.isInvisible import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.features.notifications.toNotificationAction import im.vector.app.features.themes.ThemeUtils import org.matrix.android.sdk.api.session.pushrules.getActions import org.matrix.android.sdk.api.session.pushrules.rest.PushRule -@EpoxyModelClass(layout = R.layout.item_pushrule_raw) -abstract class PushRuleItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class PushRuleItem : VectorEpoxyModel(R.layout.item_pushrule_raw) { @EpoxyAttribute lateinit var pushRule: PushRule diff --git a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidItem.kt b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidItem.kt index 814651dd04..4027b0adf2 100644 --- a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidItem.kt @@ -22,14 +22,14 @@ import androidx.annotation.DrawableRes import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_settings_three_pid) -abstract class ThreePidItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class ThreePidItem : VectorEpoxyModel(R.layout.item_settings_three_pid) { @EpoxyAttribute var title: String? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginCenterButtonItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginCenterButtonItem.kt index f3e6378a4b..60cf34c2c2 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginCenterButtonItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginCenterButtonItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_login_centered_button) -abstract class LoginCenterButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginCenterButtonItem : VectorEpoxyModel(R.layout.item_login_centered_button) { @EpoxyAttribute var text: String? = null @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginErrorWithRetryItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginErrorWithRetryItem.kt index 834fedb272..e190a41823 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginErrorWithRetryItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginErrorWithRetryItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_login_error_retry) -abstract class LoginErrorWithRetryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginErrorWithRetryItem : VectorEpoxyModel(R.layout.item_login_error_retry) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginHeaderItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginHeaderItem.kt index 0ce50b9cdb..904835a9c5 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginHeaderItem.kt @@ -21,7 +21,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_login_header) -abstract class LoginHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginHeaderItem : VectorEpoxyModel(R.layout.item_login_header) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginPasswordFormItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginPasswordFormItem.kt index c032da7192..ac65e6f641 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginPasswordFormItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginPasswordFormItem.kt @@ -35,8 +35,8 @@ import im.vector.app.core.epoxy.setValueOnce import im.vector.app.core.platform.SimpleTextWatcher import im.vector.app.core.resources.StringProvider -@EpoxyModelClass(layout = R.layout.item_login_password_form) -abstract class LoginPasswordFormItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginPasswordFormItem : VectorEpoxyModel(R.layout.item_login_password_form) { @EpoxyAttribute var passwordValue: String = "" @EpoxyAttribute var submitEnabled: Boolean = false diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginRedButtonItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginRedButtonItem.kt index 981de3c962..3febdc20b6 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginRedButtonItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginRedButtonItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_login_red_button) -abstract class LoginRedButtonItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginRedButtonItem : VectorEpoxyModel(R.layout.item_login_red_button) { @EpoxyAttribute var text: String? = null @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTextItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTextItem.kt index f2727379ab..b036b2d77a 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTextItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_login_text) -abstract class LoginTextItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginTextItem : VectorEpoxyModel(R.layout.item_login_text) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleItem.kt index dcb565b490..d2627590d8 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_login_title) -abstract class LoginTitleItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginTitleItem : VectorEpoxyModel(R.layout.item_login_title) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleSmallItem.kt b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleSmallItem.kt index 04f5ca0a78..796a271b28 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleSmallItem.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/epoxy/LoginTitleSmallItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_login_title_small) -abstract class LoginTitleSmallItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class LoginTitleSmallItem : VectorEpoxyModel(R.layout.item_login_title_small) { @EpoxyAttribute var text: String? = null diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceAddItem.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceAddItem.kt index f25de9fe99..02bb702fae 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceAddItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceAddItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_space_add) -abstract class SpaceAddItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceAddItem : VectorEpoxyModel(R.layout.item_space_add) { @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt index 667f895d4d..8cf3766c73 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt @@ -21,7 +21,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_space_beta_header) -abstract class SpaceBetaHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceBetaHeaderItem : VectorEpoxyModel(R.layout.item_space_beta_header) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryItem.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryItem.kt index cc75fd5b2e..192c6c8781 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryItem.kt @@ -36,8 +36,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.list.UnreadCounterBadgeView import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_space) -abstract class SpaceSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceSummaryItem : VectorEpoxyModel(R.layout.item_space) { @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/spaces/SubSpaceSummaryItem.kt b/vector/src/main/java/im/vector/app/features/spaces/SubSpaceSummaryItem.kt index 201282b113..871605c9d8 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SubSpaceSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SubSpaceSummaryItem.kt @@ -34,8 +34,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.list.UnreadCounterBadgeView import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_sub_space) -abstract class SubSpaceSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SubSpaceSummaryItem : VectorEpoxyModel(R.layout.item_sub_space) { @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomManageSelectionItem.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomManageSelectionItem.kt index 21da4f0dfe..b1ccc1aa59 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomManageSelectionItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomManageSelectionItem.kt @@ -31,8 +31,8 @@ import im.vector.app.features.displayname.getBestName import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_room_to_manage_in_space) -abstract class RoomManageSelectionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomManageSelectionItem : VectorEpoxyModel(R.layout.item_room_to_manage_in_space) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionItem.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionItem.kt index df736bebbb..9d101bdb5f 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionItem.kt @@ -30,8 +30,8 @@ import im.vector.app.features.displayname.getBestName import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_room_to_add_in_space) -abstract class RoomSelectionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomSelectionItem : VectorEpoxyModel(R.layout.item_room_to_add_in_space) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionPlaceHolderItem.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionPlaceHolderItem.kt index 7c116811b4..46aa655a8d 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionPlaceHolderItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/RoomSelectionPlaceHolderItem.kt @@ -21,7 +21,7 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_room_to_add_in_space_placeholder) -abstract class RoomSelectionPlaceHolderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomSelectionPlaceHolderItem : VectorEpoxyModel(R.layout.item_room_to_add_in_space_placeholder) { class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/RoomChildItem.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/RoomChildItem.kt index bf28618c6c..263cc3ef1d 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/RoomChildItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/RoomChildItem.kt @@ -27,8 +27,8 @@ import im.vector.app.core.extensions.setTextOrHide import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_space_roomchild) -abstract class RoomChildItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class RoomChildItem : VectorEpoxyModel(R.layout.item_space_roomchild) { @EpoxyAttribute lateinit var roomId: String diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTopSummaryItem.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTopSummaryItem.kt index c357fb14b3..eee37a585f 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTopSummaryItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTopSummaryItem.kt @@ -24,8 +24,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_space_top_summary) -abstract class SpaceTopSummaryItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SpaceTopSummaryItem : VectorEpoxyModel(R.layout.item_space_top_summary) { @EpoxyAttribute var topic: String? = null diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SubSpaceItem.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SubSpaceItem.kt index 1856edb61f..b1837be9c6 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SubSpaceItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SubSpaceItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.features.home.AvatarRenderer import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_space_subspace) -abstract class SubSpaceItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class SubSpaceItem : VectorEpoxyModel(R.layout.item_space_subspace) { @EpoxyAttribute lateinit var roomId: String diff --git a/vector/src/main/java/im/vector/app/features/terms/TermItem.kt b/vector/src/main/java/im/vector/app/features/terms/TermItem.kt index b292c5b119..125139a8ca 100644 --- a/vector/src/main/java/im/vector/app/features/terms/TermItem.kt +++ b/vector/src/main/java/im/vector/app/features/terms/TermItem.kt @@ -21,14 +21,14 @@ import android.widget.CompoundButton import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass -import com.airbnb.epoxy.EpoxyModelWithHolder import im.vector.app.R import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder +import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick -@EpoxyModelClass(layout = R.layout.item_tos) -abstract class TermItem : EpoxyModelWithHolder() { +@EpoxyModelClass +abstract class TermItem : VectorEpoxyModel(R.layout.item_tos) { @EpoxyAttribute var checked: Boolean = false diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/ActionItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/ActionItem.kt index a4c71c8cb9..fcf117ba88 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/ActionItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/ActionItem.kt @@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_contact_action) -abstract class ActionItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ActionItem : VectorEpoxyModel(R.layout.item_contact_action) { @EpoxyAttribute var title: String? = null @EpoxyAttribute @DrawableRes var actionIconRes: Int? = null diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/ContactDetailItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/ContactDetailItem.kt index 8d2e80d4db..3fffb1ec31 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/ContactDetailItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/ContactDetailItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide -@EpoxyModelClass(layout = R.layout.item_contact_detail) -abstract class ContactDetailItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ContactDetailItem : VectorEpoxyModel(R.layout.item_contact_detail) { @EpoxyAttribute lateinit var threePid: String @EpoxyAttribute var matrixId: String? = null diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/ContactItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/ContactItem.kt index d9f424d961..ea5101d413 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/ContactItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/ContactItem.kt @@ -26,8 +26,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_contact_main) -abstract class ContactItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class ContactItem : VectorEpoxyModel(R.layout.item_contact_main) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var mappedContact: MappedContact diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/InviteByEmailItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/InviteByEmailItem.kt index 2258239bde..eaeec35791 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/InviteByEmailItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/InviteByEmailItem.kt @@ -27,8 +27,8 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel import im.vector.app.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_invite_by_mail) -abstract class InviteByEmailItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class InviteByEmailItem : VectorEpoxyModel(R.layout.item_invite_by_mail) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var foundItem: ThreePidUser diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryLetterHeaderItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryLetterHeaderItem.kt index 63f68a1f8b..78de9d7925 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryLetterHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryLetterHeaderItem.kt @@ -23,8 +23,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_user_directory_letter_header) -abstract class UserDirectoryLetterHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UserDirectoryLetterHeaderItem : VectorEpoxyModel(R.layout.item_user_directory_letter_header) { @EpoxyAttribute var letter: String = "" diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryUserItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryUserItem.kt index 5138e5694c..5dac059efc 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryUserItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/UserDirectoryUserItem.kt @@ -31,8 +31,8 @@ import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.themes.ThemeUtils import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_known_user) -abstract class UserDirectoryUserItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UserDirectoryUserItem : VectorEpoxyModel(R.layout.item_known_user) { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem diff --git a/vector/src/main/java/im/vector/app/features/userdirectory/UserListHeaderItem.kt b/vector/src/main/java/im/vector/app/features/userdirectory/UserListHeaderItem.kt index 82fa4a4d6f..bdc2a385e8 100644 --- a/vector/src/main/java/im/vector/app/features/userdirectory/UserListHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/userdirectory/UserListHeaderItem.kt @@ -23,8 +23,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_user_list_header) -abstract class UserListHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass +abstract class UserListHeaderItem : VectorEpoxyModel(R.layout.item_user_list_header) { @EpoxyAttribute var header: String = ""