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

Add drawer to all main tabs and general drawer changes #991

Merged
merged 16 commits into from
Jul 10, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 7, 2023

  • Add drawer to all the main tabs.
  • Made it so that it doesn't display the nav also in the drawer if the buttomNavBar is visible.
  • Removed lots of duplicate logic surrounding the navBottom.
  • Also fixed switching being tabs that back still would return sometimes. Same fix as Fix clear backstack not working properly #988.
  • Removed duplicate string resources.
  • Also moved drawer stuff into its own package.
studio64_BPpxMxVGjp.mp4

Fixes #914

@nahwneeth What's the reason for the duplicate navhost in BottomNavActivity? I think it can be removed.

@nahwneeth
Copy link
Contributor

The second nav host only has pages that are on the bottom nav (home, search, inbox, saved, profile). And the bottom nav bar is outside this second nav host. This way we can avoid having the bottom nav on every page (which was how it was previously).

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 7, 2023

This way we can avoid having the bottom nav on every page (which was how it was previously).

I am not following, why does it require a second navhost with only bottomnav composables. Can it not use the ones defined in the root navhost?

@nahwneeth
Copy link
Contributor

Then the bottom nav has to be duplicated on those 5 pages right? Coz what I found was the bottom nav can only be specified on the scaffold, and I couldn't come up with a better way than using a second nav host within a Scaffold.

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 7, 2023

I think i understand what you mean. If i move the drawer stuff and navBottomBar to the root. It would mean all screens/composable defined in root would have the the drawer and navBottomBar? But maybe it can still be done

@MV-GH MV-GH marked this pull request as ready for review July 7, 2023 17:16
@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 10, 2023

@dessalines Fixed

@dessalines dessalines merged commit 3d79c6d into LemmyNet:main Jul 10, 2023
@MV-GH MV-GH deleted the feat/drawer_changes branch July 10, 2023 21:46
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.

Make NavigationDrawer accessible from all top level views
3 participants