code4romania / teacher-workout-android

Teacher Workout Android app
Mozilla Public License 2.0
5 stars 17 forks source link

Improve/fix navigation to the Lesson Feature #47

Open daniyelp opened 2 years ago

daniyelp commented 2 years ago

As the title says, the navigation to the lessonFeature needs some revising. Currently it works, but it is not possible to add a second destination to the "presumed nav graph". lessonFeature contains a navigation composable having the lesson id as argument and the Lesson start screen as the content. But the navigation composable should be instead a nested nav graph that has as "children" composables with all the screens related to a lesson (start, progress, finish screens). Also, currently, passing the lesson id argument to the specific navigation route involves hard coding the route, which isn't type safe. I would have fixed the first issue myself back then, but I couldn't find a correct way of passing arguments to a nested nav graph.