jeanbarrossilva / Ongoing

Track shared activities in real time.
0 stars 0 forks source link

Replace `Activity`-based navigation by a Compose-only approach #6

Closed jeanbarrossilva closed 2 years ago

jeanbarrossilva commented 2 years ago

Mixing activities and Compose has not been the best experience I've ever had, mostly because it is a pain to instrument test the UI. Since I haven't found any guidance on how to test an Activity that receives arguments through the Intent's extras whilst dynamically changing the value of that same argument and using AndroidComposeTestRule + ActivityScenario, I figured I'd be better off by simply getting rid of the feature activities and just using a single public Composable for each module instead.

The Compose navigation library provided by Google is horrific, so I went on with compose-destinations (which is somewhat amazing). Even though I think it's best to remove the coupling that's been formed between the feature modules and the library (by using DestinationsNavigator in some Composables), maybe it's fine for now.