Add EpoxyAttribute.Option.DoNotHash for all click listener in Epoxy items

This commit is contained in:
Benoit Marty 2021-05-31 16:15:52 +02:00
parent 2c5418feaa
commit 4328b42254
44 changed files with 54 additions and 52 deletions

View file

@ -29,7 +29,7 @@ abstract class ErrorWithRetryItem : VectorEpoxyModel<ErrorWithRetryItem.Holder>(
@EpoxyAttribute
var text: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var listener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -71,7 +71,7 @@ abstract class BottomSheetActionItem : VectorEpoxyModel<BottomSheetActionItem.Ho
@EpoxyAttribute
var destructive = false
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
lateinit var listener: ClickListener
override fun bind(holder: Holder) {

View file

@ -63,7 +63,7 @@ abstract class BottomSheetMessagePreviewItem : VectorEpoxyModel<BottomSheetMessa
@EpoxyAttribute
var movementMethod: MovementMethod? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var userClicked: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -48,7 +48,7 @@ abstract class BottomSheetRadioActionItem : VectorEpoxyModel<BottomSheetRadioAct
@EpoxyAttribute
var description: CharSequence? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
lateinit var listener: ClickListener
override fun bind(holder: Holder) {

View file

@ -47,9 +47,9 @@ abstract class BottomSheetRoomPreviewItem : VectorEpoxyModel<BottomSheetRoomPrev
@EpoxyAttribute lateinit var stringProvider: StringProvider
@EpoxyAttribute var izLowPriority: Boolean = false
@EpoxyAttribute var izFavorite: Boolean = false
@EpoxyAttribute var settingsClickListener: ClickListener? = null
@EpoxyAttribute var lowPriorityClickListener: ClickListener? = null
@EpoxyAttribute var favoriteClickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var settingsClickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var lowPriorityClickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var favoriteClickListener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -34,7 +34,9 @@ abstract class BaseProfileMatrixItem<T : ProfileMatrixItem.Holder> : VectorEpoxy
@EpoxyAttribute
var userEncryptionTrustLevel: RoomEncryptionTrustLevel? = null
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickListener: ClickListener? = null
@CallSuper
override fun bind(holder: T) {

View file

@ -67,7 +67,7 @@ abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>()
@EpoxyAttribute
var destructive: Boolean = false
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var listener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -36,7 +36,7 @@ abstract class GenericButtonItem : VectorEpoxyModel<GenericButtonItem.Holder>()
@EpoxyAttribute
var text: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var buttonClickAction: ClickListener? = null
@EpoxyAttribute

View file

@ -43,7 +43,7 @@ abstract class GenericFooterItem : VectorEpoxyModel<GenericFooterItem.Holder>()
@EpoxyAttribute
var style: ItemStyle = ItemStyle.NORMAL_TEXT
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickAction: ClickListener? = null
@EpoxyAttribute

View file

@ -66,7 +66,7 @@ abstract class GenericItem : VectorEpoxyModel<GenericItem.Holder>() {
@EpoxyAttribute
var destructiveButtonAction: Action? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickAction: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -44,7 +44,7 @@ abstract class GenericPillItem : VectorEpoxyModel<GenericPillItem.Holder>() {
@EpoxyAttribute
var style: ItemStyle = ItemStyle.NORMAL_TEXT
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickAction: ClickListener? = null
@EpoxyAttribute

View file

@ -35,7 +35,7 @@ abstract class GenericPositiveButtonItem : VectorEpoxyModel<GenericPositiveButto
@EpoxyAttribute
var text: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var buttonClickAction: ClickListener? = null
@EpoxyAttribute

View file

@ -54,7 +54,7 @@ abstract class GenericWithValueItem : VectorEpoxyModel<GenericWithValueItem.Hold
@DrawableRes
var titleIconResourceId: Int = -1
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickAction: ClickListener? = null
@EpoxyAttribute

View file

@ -35,7 +35,7 @@ abstract class AutocompleteMatrixItem : VectorEpoxyModel<AutocompleteMatrixItem.
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var subName: String? = null
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickListener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -37,7 +37,7 @@ abstract class AutocompleteCommandItem : VectorEpoxyModel<AutocompleteCommandIte
@EpoxyAttribute
var description: CharSequence? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -37,7 +37,7 @@ abstract class AutocompleteEmojiItem : VectorEpoxyModel<AutocompleteEmojiItem.Ho
@EpoxyAttribute
var emojiTypeFace: Typeface? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var onClickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -31,7 +31,9 @@ abstract class ContactDetailItem : VectorEpoxyModel<ContactDetailItem.Holder>()
@EpoxyAttribute lateinit var threePid: String
@EpoxyAttribute var matrixId: String? = null
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickListener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -33,13 +33,13 @@ abstract class KeysBackupSettingFooterItem : VectorEpoxyModel<KeysBackupSettingF
@EpoxyAttribute
var textButton1: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickOnButton1: ClickListener? = null
@EpoxyAttribute
var textButton2: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickOnButton2: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -53,7 +53,7 @@ abstract class BottomSheetVerificationActionItem : VectorEpoxyModel<BottomSheetV
@EpoxyAttribute
var iconColor: Int = -1
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
lateinit var listener: ClickListener
override fun bind(holder: Holder) {

View file

@ -44,7 +44,7 @@ abstract class SettingsButtonItem : EpoxyModelWithHolder<SettingsButtonItem.Hold
@EpoxyAttribute
var buttonStyle: ButtonStyle = ButtonStyle.POSITIVE
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var buttonClickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -30,13 +30,13 @@ abstract class SettingsContinueCancelItem : EpoxyModelWithHolder<SettingsContinu
@EpoxyAttribute
var continueText: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var continueOnClick: ClickListener? = null
@EpoxyAttribute
var canContinue: Boolean = true
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var cancelOnClick: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -37,7 +37,7 @@ abstract class SettingsInfoItem : EpoxyModelWithHolder<SettingsInfoItem.Holder>(
@StringRes
var helperTextResId: Int? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickListener: ClickListener? = null
@EpoxyAttribute

View file

@ -45,7 +45,7 @@ abstract class SettingsItem : EpoxyModelWithHolder<SettingsItem.Holder>() {
@EpoxyAttribute
var description: CharSequence? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var itemClickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -78,7 +78,7 @@ abstract class SettingsTextButtonSingleLineItem : EpoxyModelWithHolder<SettingsT
@EpoxyAttribute
var checked: Boolean? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var buttonClickListener: ClickListener? = null
@EpoxyAttribute

View file

@ -33,7 +33,7 @@ abstract class FormAdvancedToggleItem : VectorEpoxyModel<FormAdvancedToggleItem.
@EpoxyAttribute lateinit var title: CharSequence
@EpoxyAttribute var expanded: Boolean = false
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -48,7 +48,7 @@ abstract class FormEditTextWithButtonItem : VectorEpoxyModel<FormEditTextWithBut
@EpoxyAttribute
var onTextChange: ((String) -> Unit)? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var onButtonClicked: ClickListener? = null
private val onTextChangeListener = object : SimpleTextWatcher() {

View file

@ -46,10 +46,10 @@ abstract class FormEditableAvatarItem : EpoxyModelWithHolder<FormEditableAvatarI
@EpoxyAttribute
var imageUri: Uri? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickListener: ClickListener? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var deleteListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -49,10 +49,10 @@ abstract class FormEditableSquareAvatarItem : EpoxyModelWithHolder<FormEditableS
@EpoxyAttribute
var imageUri: Uri? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickListener: ClickListener? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var deleteListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -39,7 +39,7 @@ abstract class FormSubmitButtonItem : EpoxyModelWithHolder<FormSubmitButtonItem.
@StringRes
var buttonTitleId: Int? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var buttonClickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -36,7 +36,7 @@ abstract class GroupSummaryItem : VectorEpoxyModel<GroupSummaryItem.Holder>() {
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var selected: Boolean = false
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -35,7 +35,7 @@ abstract class DisplayReadReceiptItem : EpoxyModelWithHolder<DisplayReadReceiptI
@EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var timestamp: CharSequence? = null
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute var userClicked: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var userClicked: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -36,7 +36,7 @@ abstract class SearchResultItem : VectorEpoxyModel<SearchResultItem.Holder>() {
@EpoxyAttribute var formattedDate: String? = null
@EpoxyAttribute lateinit var spannable: CharSequence
@EpoxyAttribute var sender: MatrixItem? = null
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -41,7 +41,7 @@ abstract class ReactionInfoSimpleItem : EpoxyModelWithHolder<ReactionInfoSimpleI
@EpoxyAttribute
var timeStamp: CharSequence? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var userClicked: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -35,7 +35,7 @@ import java.net.URL
abstract class RoomWidgetItem : EpoxyModelWithHolder<RoomWidgetItem.Holder>() {
@EpoxyAttribute lateinit var widget: Widget
@EpoxyAttribute var widgetClicked: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var widgetClicked: ClickListener? = null
@DrawableRes
@EpoxyAttribute var iconRes: Int? = null

View file

@ -36,7 +36,7 @@ abstract class EmojiSearchResultItem : EpoxyModelWithHolder<EmojiSearchResultIte
@EpoxyAttribute
var currentQuery: String? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var onClickListener: ClickListener? = null
@EpoxyAttribute

View file

@ -40,7 +40,7 @@ abstract class RoomDirectoryServerItem : VectorEpoxyModel<RoomDirectoryServerIte
@EpoxyAttribute
var canRemove: Boolean = false
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var removeListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -32,8 +32,7 @@ abstract class UploadsImageItem : VectorEpoxyModel<UploadsImageItem.Holder>() {
@EpoxyAttribute lateinit var imageContentRenderer: ImageContentRenderer
@EpoxyAttribute lateinit var data: ImageContentRenderer.Data
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -33,8 +33,7 @@ abstract class UploadsVideoItem : VectorEpoxyModel<UploadsVideoItem.Holder>() {
@EpoxyAttribute lateinit var imageContentRenderer: ImageContentRenderer
@EpoxyAttribute lateinit var data: VideoContentRenderer.Data
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -31,7 +31,7 @@ abstract class LocaleItem : VectorEpoxyModel<LocaleItem.Holder>() {
@EpoxyAttribute var title: String? = null
@EpoxyAttribute var subtitle: String? = null
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickListener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -38,7 +38,7 @@ abstract class ThreePidItem : EpoxyModelWithHolder<ThreePidItem.Holder>() {
@DrawableRes
var iconResId: Int? = null
@EpoxyAttribute
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var deleteClickListener: ClickListener? = null
override fun bind(holder: Holder) {

View file

@ -27,7 +27,7 @@ import im.vector.app.core.epoxy.onClick
@EpoxyModelClass(layout = R.layout.item_space_add)
abstract class SpaceAddItem : VectorEpoxyModel<SpaceAddItem.Holder>() {
@EpoxyAttribute var listener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var listener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -33,7 +33,7 @@ abstract class ActionItem : VectorEpoxyModel<ActionItem.Holder>() {
@EpoxyAttribute var title: CharSequence? = null
@EpoxyAttribute @DrawableRes var actionIconRes: Int? = null
@EpoxyAttribute var clickAction: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickAction: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -31,7 +31,7 @@ abstract class ContactDetailItem : VectorEpoxyModel<ContactDetailItem.Holder>()
@EpoxyAttribute lateinit var threePid: String
@EpoxyAttribute var matrixId: String? = null
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickListener: ClickListener? = null
override fun bind(holder: Holder) {
super.bind(holder)

View file

@ -36,7 +36,7 @@ abstract class UserDirectoryUserItem : VectorEpoxyModel<UserDirectoryUserItem.Ho
@EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer
@EpoxyAttribute lateinit var matrixItem: MatrixItem
@EpoxyAttribute var clickListener: ClickListener? = null
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickListener: ClickListener? = null
@EpoxyAttribute var selected: Boolean = false
override fun bind(holder: Holder) {