Appends to comment in SpaceListFragment and refactors SpaceListBottomSheet class name
This commit is contained in:
parent
a821f34fc0
commit
90f2b93763
|
@ -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.RoomListQuickActionsSharedActionViewModel
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListSharedAction
|
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.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.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
import org.matrix.android.sdk.api.session.room.model.RoomSummary
|
||||||
|
@ -67,7 +67,7 @@ class HomeRoomListFragment @Inject constructor(
|
||||||
private var concatAdapter = ConcatAdapter()
|
private var concatAdapter = ConcatAdapter()
|
||||||
private var modelBuildListener: OnModelBuildFinishedListener? = null
|
private var modelBuildListener: OnModelBuildFinishedListener? = null
|
||||||
|
|
||||||
private val spacesBottomSheet = SpacesBottomSheet()
|
private val spaceListBottomSheet = SpaceListBottomSheet()
|
||||||
|
|
||||||
private lateinit var stateRestorer: LayoutManagerStateRestorer
|
private lateinit var stateRestorer: LayoutManagerStateRestorer
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class HomeRoomListFragment @Inject constructor(
|
||||||
|
|
||||||
private fun handleSharedAction(action: RoomListSharedAction) {
|
private fun handleSharedAction(action: RoomListSharedAction) {
|
||||||
when (action) {
|
when (action) {
|
||||||
RoomListSharedAction.CloseBottomSheet -> spacesBottomSheet.dismiss()
|
RoomListSharedAction.CloseBottomSheet -> spaceListBottomSheet.dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ class HomeRoomListFragment @Inject constructor(
|
||||||
|
|
||||||
views.newLayoutOpenSpacesButton.setOnClickListener {
|
views.newLayoutOpenSpacesButton.setOnClickListener {
|
||||||
// Click action for open spaces modal goes here
|
// 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
|
// Hide FABs when list is scrolling
|
||||||
|
|
|
@ -25,7 +25,7 @@ import im.vector.app.R
|
||||||
import im.vector.app.core.extensions.replaceChildFragment
|
import im.vector.app.core.extensions.replaceChildFragment
|
||||||
import im.vector.app.databinding.FragmentSpacesBottomSheetBinding
|
import im.vector.app.databinding.FragmentSpacesBottomSheetBinding
|
||||||
|
|
||||||
class SpacesBottomSheet : BottomSheetDialogFragment() {
|
class SpaceListBottomSheet : BottomSheetDialogFragment() {
|
||||||
|
|
||||||
private lateinit var binding: FragmentSpacesBottomSheetBinding
|
private lateinit var binding: FragmentSpacesBottomSheetBinding
|
||||||
|
|
|
@ -43,6 +43,9 @@ import javax.inject.Inject
|
||||||
/**
|
/**
|
||||||
* This Fragment is displayed in the navigation drawer [im.vector.app.features.home.HomeDrawerFragment] and
|
* 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.
|
* 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(
|
class SpaceListFragment @Inject constructor(
|
||||||
private val spaceController: SpaceSummaryController,
|
private val spaceController: SpaceSummaryController,
|
||||||
|
|
Loading…
Reference in New Issue