diff --git a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt index cb163622fa..0d5e64d3d7 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt @@ -40,7 +40,7 @@ import im.vector.app.core.resources.ColorProvider import im.vector.app.core.utils.colorizeMatchingText import im.vector.app.core.utils.isValidUrl import im.vector.app.core.utils.openUrlInExternalBrowser -import im.vector.app.databinding.FragmentRoomDirectoryPickerBinding +import im.vector.app.databinding.FragmentSpaceDirectoryBinding import im.vector.app.features.home.room.detail.timeline.TimelineEventController import im.vector.app.features.matrixto.SpaceCardRenderer import im.vector.app.features.permalink.PermalinkHandler @@ -63,7 +63,7 @@ class SpaceDirectoryFragment @Inject constructor( private val permalinkHandler: PermalinkHandler, private val spaceCardRenderer: SpaceCardRenderer, private val colorProvider: ColorProvider -) : VectorBaseFragment(), +) : VectorBaseFragment(), SpaceDirectoryController.InteractionListener, TimelineEventController.UrlClickCallback, OnBackPressed { @@ -71,7 +71,7 @@ class SpaceDirectoryFragment @Inject constructor( override fun getMenuRes() = R.menu.menu_space_directory override fun getBinding(inflater: LayoutInflater, container: ViewGroup?) = - FragmentRoomDirectoryPickerBinding.inflate(layoutInflater, container, false) + FragmentSpaceDirectoryBinding.inflate(layoutInflater, container, false) private val viewModel by activityViewModel(SpaceDirectoryViewModel::class) @@ -85,7 +85,7 @@ class SpaceDirectoryFragment @Inject constructor( it.setDisplayHomeAsUpEnabled(true) } epoxyController.listener = this - views.roomDirectoryPickerList.configureWith(epoxyController) + views.spaceDirectoryList.configureWith(epoxyController) viewModel.selectSubscribe(this, SpaceDirectoryState::canAddRooms) { invalidateOptionsMenu() @@ -97,7 +97,7 @@ class SpaceDirectoryFragment @Inject constructor( override fun onDestroyView() { epoxyController.listener = null - views.roomDirectoryPickerList.cleanup() + views.spaceDirectoryList.cleanup() super.onDestroyView() } diff --git a/vector/src/main/res/layout/fragment_room_directory_picker.xml b/vector/src/main/res/layout/fragment_room_directory_picker.xml index acb905c0bd..60dccd6e37 100644 --- a/vector/src/main/res/layout/fragment_room_directory_picker.xml +++ b/vector/src/main/res/layout/fragment_room_directory_picker.xml @@ -7,49 +7,34 @@ android:layout_height="match_parent" android:background="?android:colorBackground"> - + android:layout_height="match_parent"> - - - - - - - + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent"> + tools:title="Title" /> - + - + - - + \ No newline at end of file diff --git a/vector/src/main/res/layout/fragment_space_directory.xml b/vector/src/main/res/layout/fragment_space_directory.xml new file mode 100644 index 0000000000..3d5932df4a --- /dev/null +++ b/vector/src/main/res/layout/fragment_space_directory.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file