Fix crashes at some screens when saving the state

This commit is contained in:
Jonas Lochmann 2023-02-13 01:00:00 +01:00
parent 0d02bc0805
commit d080e26a2d
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -83,6 +83,7 @@ sealed class State (val previous: State?): Serializable {
@Transient @Transient
override val arguments = ManageChildFragmentArgs(childId = childId, fromRedirect = fromRedirect).toBundle() override val arguments = ManageChildFragmentArgs(childId = childId, fromRedirect = fromRedirect).toBundle()
@Transient
override val toolbarIcons: List<Menu.Icon> = listOf( override val toolbarIcons: List<Menu.Icon> = listOf(
Menu.Icon( Menu.Icon(
Icons.Default.DirectionsBike, Icons.Default.DirectionsBike,
@ -96,6 +97,7 @@ sealed class State (val previous: State?): Serializable {
) )
) )
@Transient
override val toolbarOptions: List<Menu.Dropdown> = listOf( override val toolbarOptions: List<Menu.Dropdown> = listOf(
Menu.Dropdown(R.string.child_apps_title, UpdateStateCommand.ManageChild.Apps), Menu.Dropdown(R.string.child_apps_title, UpdateStateCommand.ManageChild.Apps),
Menu.Dropdown(R.string.usage_history_title, UpdateStateCommand.ManageChild.UsageHistory), Menu.Dropdown(R.string.usage_history_title, UpdateStateCommand.ManageChild.UsageHistory),
@ -132,6 +134,7 @@ sealed class State (val previous: State?): Serializable {
categoryId = categoryId categoryId = categoryId
).toBundle() ).toBundle()
@Transient
override val toolbarOptions: List<Menu.Dropdown> = listOf( override val toolbarOptions: List<Menu.Dropdown> = listOf(
Menu.Dropdown(R.string.blocked_time_areas, UpdateStateCommand.ManageChild.BlockedTimes), Menu.Dropdown(R.string.blocked_time_areas, UpdateStateCommand.ManageChild.BlockedTimes),
Menu.Dropdown(R.string.category_settings, UpdateStateCommand.ManageChild.CategoryAdvanced) Menu.Dropdown(R.string.category_settings, UpdateStateCommand.ManageChild.CategoryAdvanced)