Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up HomeScreen nav example #475

Merged
merged 6 commits into from
Mar 14, 2023
Merged

Clean up HomeScreen nav example #475

merged 6 commits into from
Mar 14, 2023

Conversation

ZacSweers
Copy link
Collaborator

We're working on a more fleshed out example of composite presenters, so cleaning this one up as it's sort of fallen out of date.

We're working on a more fleshed out example of composite presenters, so cleaning this one up as it's sort of fallen out of date.
@ZacSweers ZacSweers requested review from kierse and jpetote March 1, 2023 20:38
Comment on lines 13 to 16
class HomeNavState {
val navItems: ImmutableList<BottomNavItem> =
persistentListOf(BottomNavItem.Adoptables, BottomNavItem.About)
var index by mutableStateOf(0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we couldn't simplify this further and pass the screen down to the UI instead of using BottomNavItem? Both Adoptables and About are 0 simple objects making this indirection feel like unnecessary boilerplate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the separation is bad in this case tbh, vs stuffing it into the home screen state

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fair enough 👍

Copy link
Collaborator

@kierse kierse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better! One question that may lead to more cleanup

@ZacSweers
Copy link
Collaborator Author

uhhh what happened to this test

@ZacSweers ZacSweers enabled auto-merge March 14, 2023 21:23
@ZacSweers ZacSweers added this pull request to the merge queue Mar 14, 2023
Merged via the queue into main with commit 305a2f9 Mar 14, 2023
@ZacSweers ZacSweers deleted the z/homeScreenCleanup branch March 14, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants