From f559ae1b3513cc678fa7e653f6f33ad346914d86 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 27 May 2021 16:55:40 +0200 Subject: [PATCH] Rename to avoid collision with Matrix Spaces --- .../list/{GenericSpaceItem.kt => VerticalMarginItem.kt} | 6 +++--- .../roomdirectory/picker/RoomDirectoryPickerController.kt | 8 ++++---- .../{item_generic_space.xml => item_vertical_margin.xml} | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename vector/src/main/java/im/vector/app/core/ui/list/{GenericSpaceItem.kt => VerticalMarginItem.kt} (85%) rename vector/src/main/res/layout/{item_generic_space.xml => item_vertical_margin.xml} (80%) diff --git a/vector/src/main/java/im/vector/app/core/ui/list/GenericSpaceItem.kt b/vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt similarity index 85% rename from vector/src/main/java/im/vector/app/core/ui/list/GenericSpaceItem.kt rename to vector/src/main/java/im/vector/app/core/ui/list/VerticalMarginItem.kt index 137fac9abe..ec99c7c215 100644 --- a/vector/src/main/java/im/vector/app/core/ui/list/GenericSpaceItem.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_generic_space) -abstract class GenericSpaceItem : VectorEpoxyModel() { +@EpoxyModelClass(layout = R.layout.item_vertical_margin) +abstract class VerticalMarginItem : VectorEpoxyModel() { @EpoxyAttribute var heightInPx: Int = 0 @@ -40,6 +40,6 @@ abstract class GenericSpaceItem : VectorEpoxyModel() { } class Holder : VectorEpoxyHolder() { - val space by bind(R.id.item_generic_space) + val space by bind(R.id.item_vertical_margin_space) } } diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerController.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerController.kt index 8f45422c29..2b60a5d294 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerController.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerController.kt @@ -36,7 +36,7 @@ import im.vector.app.core.extensions.join import im.vector.app.core.resources.ColorProvider import im.vector.app.core.resources.StringProvider import im.vector.app.core.ui.list.genericButtonItem -import im.vector.app.core.ui.list.genericSpaceItem +import im.vector.app.core.ui.list.verticalMarginItem import im.vector.app.core.utils.DimensionConverter import im.vector.app.features.discovery.settingsContinueCancelItem import im.vector.app.features.discovery.settingsInformationItem @@ -69,7 +69,7 @@ class RoomDirectoryPickerController @Inject constructor( between = { idx, _ -> buildDivider(idx) } ) buildForm(data) - genericSpaceItem { + verticalMarginItem { id("space_bottom") heightInPx(host.dimensionConverter.dpToPx(16)) } @@ -93,7 +93,7 @@ class RoomDirectoryPickerController @Inject constructor( buildDivider(1000) val host = this if (data.inEditMode) { - genericSpaceItem { + verticalMarginItem { id("form_space") heightInPx(host.dimensionConverter.dpToPx(16)) } @@ -102,7 +102,7 @@ class RoomDirectoryPickerController @Inject constructor( message(host.stringProvider.getString(R.string.directory_add_a_new_server_prompt)) colorProvider(host.colorProvider) } - genericSpaceItem { + verticalMarginItem { id("form_space_2") heightInPx(host.dimensionConverter.dpToPx(8)) } diff --git a/vector/src/main/res/layout/item_generic_space.xml b/vector/src/main/res/layout/item_vertical_margin.xml similarity index 80% rename from vector/src/main/res/layout/item_generic_space.xml rename to vector/src/main/res/layout/item_vertical_margin.xml index aef6664f94..fac46e47ea 100644 --- a/vector/src/main/res/layout/item_generic_space.xml +++ b/vector/src/main/res/layout/item_vertical_margin.xml @@ -1,5 +1,5 @@