NewHomeDetailFragment now shows correct list fragment (#6740)
This commit is contained in:
parent
2dc92caa30
commit
03afd2932c
|
@ -41,7 +41,6 @@ import im.vector.app.core.ui.views.CurrentCallsView
|
|||
import im.vector.app.core.ui.views.CurrentCallsViewPresenter
|
||||
import im.vector.app.core.ui.views.KeysBackupBanner
|
||||
import im.vector.app.databinding.FragmentHomeDetailBinding
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.call.SharedKnownCallsViewModel
|
||||
import im.vector.app.features.call.VectorCallActivity
|
||||
import im.vector.app.features.call.dialpad.DialPadFragment
|
||||
|
@ -49,7 +48,6 @@ import im.vector.app.features.call.webrtc.WebRtcCallManager
|
|||
import im.vector.app.features.home.room.list.RoomListFragment
|
||||
import im.vector.app.features.home.room.list.RoomListParams
|
||||
import im.vector.app.features.home.room.list.UnreadCounterBadgeView
|
||||
import im.vector.app.features.home.room.list.home.HomeRoomListFragment
|
||||
import im.vector.app.features.popup.PopupAlertManager
|
||||
import im.vector.app.features.popup.VerificationVectorAlert
|
||||
import im.vector.app.features.settings.VectorLocale
|
||||
|
@ -69,7 +67,6 @@ class HomeDetailFragment @Inject constructor(
|
|||
private val callManager: WebRtcCallManager,
|
||||
private val vectorPreferences: VectorPreferences,
|
||||
private val spaceStateHandler: SpaceStateHandler,
|
||||
private val vectorFeatures: VectorFeatures,
|
||||
) : VectorBaseFragment<FragmentHomeDetailBinding>(),
|
||||
KeysBackupBanner.Delegate,
|
||||
CurrentCallsView.Callback,
|
||||
|
@ -355,12 +352,8 @@ class HomeDetailFragment @Inject constructor(
|
|||
if (fragmentToShow == null) {
|
||||
when (tab) {
|
||||
is HomeTab.RoomList -> {
|
||||
if (vectorFeatures.isNewAppLayoutEnabled()) {
|
||||
add(R.id.roomListContainer, HomeRoomListFragment::class.java, null, fragmentTag)
|
||||
} else {
|
||||
val params = RoomListParams(tab.displayMode)
|
||||
add(R.id.roomListContainer, RoomListFragment::class.java, params.toMvRxBundle(), fragmentTag)
|
||||
}
|
||||
val params = RoomListParams(tab.displayMode)
|
||||
add(R.id.roomListContainer, RoomListFragment::class.java, params.toMvRxBundle(), fragmentTag)
|
||||
}
|
||||
is HomeTab.DialPad -> {
|
||||
add(R.id.roomListContainer, createDialPadFragment(), fragmentTag)
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.google.android.material.badge.BadgeDrawable
|
|||
import im.vector.app.R
|
||||
import im.vector.app.SpaceStateHandler
|
||||
import im.vector.app.core.extensions.commitTransaction
|
||||
import im.vector.app.core.extensions.toMvRxBundle
|
||||
import im.vector.app.core.platform.OnBackPressed
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
|
@ -45,8 +44,7 @@ import im.vector.app.features.call.SharedKnownCallsViewModel
|
|||
import im.vector.app.features.call.VectorCallActivity
|
||||
import im.vector.app.features.call.dialpad.DialPadFragment
|
||||
import im.vector.app.features.call.webrtc.WebRtcCallManager
|
||||
import im.vector.app.features.home.room.list.RoomListFragment
|
||||
import im.vector.app.features.home.room.list.RoomListParams
|
||||
import im.vector.app.features.home.room.list.home.HomeRoomListFragment
|
||||
import im.vector.app.features.popup.PopupAlertManager
|
||||
import im.vector.app.features.popup.VerificationVectorAlert
|
||||
import im.vector.app.features.settings.VectorLocale
|
||||
|
@ -339,8 +337,7 @@ class NewHomeDetailFragment @Inject constructor(
|
|||
if (fragmentToShow == null) {
|
||||
when (tab) {
|
||||
is HomeTab.RoomList -> {
|
||||
val params = RoomListParams(tab.displayMode)
|
||||
add(R.id.roomListContainer, RoomListFragment::class.java, params.toMvRxBundle(), fragmentTag)
|
||||
add(R.id.roomListContainer, HomeRoomListFragment::class.java, null, fragmentTag)
|
||||
}
|
||||
is HomeTab.DialPad -> {
|
||||
add(R.id.roomListContainer, createDialPadFragment(), fragmentTag)
|
||||
|
|
Loading…
Reference in New Issue