mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
For #3004 - Do not restore motionlayout state in ReloadData
This commit is contained in:
parent
426582c303
commit
14c581c012
@ -250,18 +250,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||||||
is SessionControlAction.Tab -> handleTabAction(it.action)
|
is SessionControlAction.Tab -> handleTabAction(it.action)
|
||||||
is SessionControlAction.Collection -> handleCollectionAction(it.action)
|
is SessionControlAction.Collection -> handleCollectionAction(it.action)
|
||||||
is SessionControlAction.Onboarding -> handleOnboardingAction(it.action)
|
is SessionControlAction.Onboarding -> handleOnboardingAction(it.action)
|
||||||
is SessionControlAction.ReloadData -> {
|
is SessionControlAction.ReloadData -> { }
|
||||||
val homeViewModel = activity?.run {
|
|
||||||
ViewModelProviders.of(this).get(HomeScreenViewModel::class.java)
|
|
||||||
}
|
|
||||||
homeViewModel?.layoutManagerState?.also { parcelable ->
|
|
||||||
sessionControlComponent.view.layoutManager?.onRestoreInstanceState(parcelable)
|
|
||||||
}
|
|
||||||
val progress = homeViewModel?.motionLayoutProgress
|
|
||||||
homeLayout?.progress =
|
|
||||||
if (progress ?: 0F > MOTION_LAYOUT_PROGRESS_ROUND_POINT) 1.0f else 0f
|
|
||||||
homeViewModel?.layoutManagerState = null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user