diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListFragment.kt
index 68143ddc7d..fae6ddb0c8 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListFragment.kt
@@ -64,6 +64,8 @@ class HomeRoomListFragment @Inject constructor(
private var concatAdapter = ConcatAdapter()
private var modelBuildListener: OnModelBuildFinishedListener? = null
+ private val spacesBottomSheet = SpacesBottomSheet()
+
private lateinit var stateRestorer: LayoutManagerStateRestorer
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentRoomListBinding {
@@ -120,7 +122,7 @@ class HomeRoomListFragment @Inject constructor(
views.newLayoutOpenSpacesButton.setOnClickListener {
// Click action for open spaces modal goes here
- SpacesBottomSheet().show(requireActivity().supportFragmentManager, SpacesBottomSheet.TAG)
+ spacesBottomSheet.show(requireActivity().supportFragmentManager, SpacesBottomSheet.TAG)
}
// Hide FABs when list is scrolling
diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt
index bf76c2eecd..51fbaad757 100644
--- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt
@@ -143,7 +143,7 @@ class SpaceListFragment @Inject constructor(
}
if (vectorFeatures.isNewAppLayoutEnabled()) {
- newSpaceController.update(state)
+ newSpaceController.update(state).also { onUpdate?.invoke() }
} else {
spaceController.update(state)
}
diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpacesBottomSheet.kt b/vector/src/main/java/im/vector/app/features/spaces/SpacesBottomSheet.kt
index c50e4b6387..757e39b85a 100644
--- a/vector/src/main/java/im/vector/app/features/spaces/SpacesBottomSheet.kt
+++ b/vector/src/main/java/im/vector/app/features/spaces/SpacesBottomSheet.kt
@@ -31,13 +31,10 @@ class SpacesBottomSheet : BottomSheetDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
binding = FragmentSpacesBottomSheetBinding.inflate(inflater, container, false)
- return binding.root
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
if (savedInstanceState == null) {
replaceChildFragment(R.id.space_list, SpaceListFragment::class.java)
}
+ return binding.root
}
companion object {
diff --git a/vector/src/main/res/layout/fragment_room_list.xml b/vector/src/main/res/layout/fragment_room_list.xml
index 631602bb14..6107482f72 100644
--- a/vector/src/main/res/layout/fragment_room_list.xml
+++ b/vector/src/main/res/layout/fragment_room_list.xml
@@ -1,101 +1,107 @@
-
+ android:layout_height="match_parent">
-
+ android:background="?android:colorBackground">
-
+
-
-
-
-
-
-
-
-
+ app:layoutDescription="@xml/motion_scene_notifs_fab_menu"
+ tools:showPaths="true"
+ tools:visibility="visible" />
+
+
+ app:maxImageSize="32dp"
+ tools:layout_marginEnd="144dp"
+ tools:visibility="visible" />
-
+
-
+
+
+
+
+
+
+
+
+
+