From e9aab6331aef19b1fa6df08d3d24c98ffb7df958 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Jul 2022 12:33:27 +0200 Subject: [PATCH 1/3] Improve layout preview, item_group does not exist anymore. --- vector/src/main/res/layout/fragment_group_list.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/layout/fragment_group_list.xml b/vector/src/main/res/layout/fragment_group_list.xml index cdf0ffeb9a..d54ffa7155 100644 --- a/vector/src/main/res/layout/fragment_group_list.xml +++ b/vector/src/main/res/layout/fragment_group_list.xml @@ -10,6 +10,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:overScrollMode="always" - tools:listitem="@layout/item_group" /> + tools:listitem="@layout/item_space" /> From 07dc0d2e54d1666d2ca8abd50ab7e95b34f5dba4 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Jul 2022 12:34:45 +0200 Subject: [PATCH 2/3] Rename layout for clarity --- .../im/vector/app/features/spaces/SpaceListFragment.kt | 8 ++++---- .../{fragment_group_list.xml => fragment_space_list.xml} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename vector/src/main/res/layout/{fragment_group_list.xml => fragment_space_list.xml} (100%) 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 ad131cbd57..b5c3beab87 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 @@ -31,7 +31,7 @@ import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.configureWith import im.vector.app.core.platform.StateView import im.vector.app.core.platform.VectorBaseFragment -import im.vector.app.databinding.FragmentGroupListBinding +import im.vector.app.databinding.FragmentSpaceListBinding import im.vector.app.features.home.HomeActivitySharedAction import im.vector.app.features.home.HomeSharedActionViewModel import org.matrix.android.sdk.api.session.room.model.RoomSummary @@ -39,13 +39,13 @@ import javax.inject.Inject class SpaceListFragment @Inject constructor( private val spaceController: SpaceSummaryController -) : VectorBaseFragment(), SpaceSummaryController.Callback { +) : VectorBaseFragment(), SpaceSummaryController.Callback { private lateinit var sharedActionViewModel: HomeSharedActionViewModel private val viewModel: SpaceListViewModel by fragmentViewModel() - override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentGroupListBinding { - return FragmentGroupListBinding.inflate(inflater, container, false) + override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSpaceListBinding { + return FragmentSpaceListBinding.inflate(inflater, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { diff --git a/vector/src/main/res/layout/fragment_group_list.xml b/vector/src/main/res/layout/fragment_space_list.xml similarity index 100% rename from vector/src/main/res/layout/fragment_group_list.xml rename to vector/src/main/res/layout/fragment_space_list.xml From b161e5eb2eb56ffed59d23df770fd3fe9a522eab Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Jul 2022 12:37:56 +0200 Subject: [PATCH 3/3] Add Kdoc on SpaceListFragment --- .../java/im/vector/app/features/spaces/SpaceListFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) 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 b5c3beab87..b358a8c1a6 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 @@ -37,6 +37,10 @@ import im.vector.app.features.home.HomeSharedActionViewModel import org.matrix.android.sdk.api.session.room.model.RoomSummary import javax.inject.Inject +/** + * This Fragment is displayed in the navigation drawer [im.vector.app.features.home.HomeDrawerFragment] and + * is displaying the space hierarchy, with some actions on Spaces. + */ class SpaceListFragment @Inject constructor( private val spaceController: SpaceSummaryController ) : VectorBaseFragment(), SpaceSummaryController.Callback {