Architecture decision of Circuit Presenter handling navigation destination #1471
-
I am using Tivi as a base architecture for a new application. In short, I am wondering how would you introduce navigation based on business logic living outside a Cirtcuit Presenter in that architecture? And also about the current Circuit design where presenters decide on the next navigation screen destination. My use case is that if a user did not finish some onboarding steps, the app should automatically redirect to the proper circuit UI/Presenters until all the steps are complete. In this case, a specific onboarding Circuit presenter would only knows about completing a step and declare when that step is complete. I am heading toward solutions where Circuit presenters don't interact directly with Circuit "Navigator" but use callback or events to be captured somewhere else, like described in the navigation section of that Cash App article: A great way to do Presenters. However this is not as straightforward as it seems. I am curious on how would you achieve this and also if you have some insight about the current Circuit architecture decision to have Circuit presenter handling navigation logic knowledge on where to go next. Especially since there are several mentions that this library is heavily influenced on how they do things at CashApp and this seems to be a discrepancy on how they and Circuit handle navigation events. Thank you for this amazing library! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Forgive me for posting a strangers thoughts on the subject, but I would check in the onboarding presenter if onboarding has already been completed and then navigate away. Add a unit test for that too. |
Beta Was this translation helpful? Give feedback.
Forgive me for posting a strangers thoughts on the subject, but I would check in the onboarding presenter if onboarding has already been completed and then navigate away. Add a unit test for that too.