Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
dessalines merged 16 commits into
LemmyNet:mainfrom
MV-GH:feat/drawer_changes
Jul 10, 2023
Merged

Add drawer to all main tabs and general drawer changes#991
dessalines merged 16 commits into
LemmyNet:mainfrom
MV-GH:feat/drawer_changes

Conversation

@MV-GH

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

Copy link
Copy Markdown
Collaborator
  • 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
Copy Markdown
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

MV-GH commented Jul 7, 2023

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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

MV-GH commented Jul 7, 2023

Copy link
Copy Markdown
Collaborator Author

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
Comment thread app/src/main/java/com/jerboa/ui/components/drawer/Drawer.kt Outdated
Comment thread app/src/main/java/com/jerboa/ui/components/drawer/DrawerActivity.kt Outdated
@MV-GH

MV-GH commented Jul 10, 2023

Copy link
Copy Markdown
Collaborator Author

@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