1
0
Fork 0

For #3004 - Do not restore motionlayout state in ReloadData

master
Emily Kager 2019-06-04 16:01:33 -07:00 committed by Jeff Boek
parent 426582c303
commit 14c581c012
1 changed files with 1 additions and 12 deletions

View File

@ -250,18 +250,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
is SessionControlAction.Tab -> handleTabAction(it.action)
is SessionControlAction.Collection -> handleCollectionAction(it.action)
is SessionControlAction.Onboarding -> handleOnboardingAction(it.action)
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
}
is SessionControlAction.ReloadData -> { }
}
}
}