Appends to comment in SpaceListFragment and refactors SpaceListBottomSheet class name

This commit is contained in:
ericdecanini 2022-08-05 12:39:52 +02:00
parent a821f34fc0
commit 90f2b93763
3 changed files with 8 additions and 5 deletions

View File

@ -46,7 +46,7 @@ import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedA
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel
import im.vector.app.features.home.room.list.actions.RoomListSharedAction
import im.vector.app.features.home.room.list.actions.RoomListSharedActionViewModel
import im.vector.app.features.spaces.SpacesBottomSheet
import im.vector.app.features.spaces.SpaceListBottomSheet
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import org.matrix.android.sdk.api.session.room.model.RoomSummary
@ -67,7 +67,7 @@ class HomeRoomListFragment @Inject constructor(
private var concatAdapter = ConcatAdapter()
private var modelBuildListener: OnModelBuildFinishedListener? = null
private val spacesBottomSheet = SpacesBottomSheet()
private val spaceListBottomSheet = SpaceListBottomSheet()
private lateinit var stateRestorer: LayoutManagerStateRestorer
@ -109,7 +109,7 @@ class HomeRoomListFragment @Inject constructor(
private fun handleSharedAction(action: RoomListSharedAction) {
when (action) {
RoomListSharedAction.CloseBottomSheet -> spacesBottomSheet.dismiss()
RoomListSharedAction.CloseBottomSheet -> spaceListBottomSheet.dismiss()
}
}
@ -168,7 +168,7 @@ class HomeRoomListFragment @Inject constructor(
views.newLayoutOpenSpacesButton.setOnClickListener {
// Click action for open spaces modal goes here
spacesBottomSheet.show(requireActivity().supportFragmentManager, SpacesBottomSheet.TAG)
spaceListBottomSheet.show(requireActivity().supportFragmentManager, SpaceListBottomSheet.TAG)
}
// Hide FABs when list is scrolling

View File

@ -25,7 +25,7 @@ import im.vector.app.R
import im.vector.app.core.extensions.replaceChildFragment
import im.vector.app.databinding.FragmentSpacesBottomSheetBinding
class SpacesBottomSheet : BottomSheetDialogFragment() {
class SpaceListBottomSheet : BottomSheetDialogFragment() {
private lateinit var binding: FragmentSpacesBottomSheetBinding

View File

@ -43,6 +43,9 @@ 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.
*
* In the New App Layout this fragment will instead be displayed in a Bottom Sheet [SpaceListBottomSheet]
* and will only display spaces that are direct children of the currently selected space (or root spaces if none)
*/
class SpaceListFragment @Inject constructor(
private val spaceController: SpaceSummaryController,