✨ [AN] Migrate to Navigation 3#50
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request migrates the application's navigation system from androidx.navigation.compose to androidx.navigation3, introducing a Navigator wrapper for backstack management and updating the UI to use Material3 components and custom transitions. Feedback identifies a potential memory leak in the Navigator's static overrides, redundant allocations in the Root composable, and missing intent flags for non-Activity contexts. Additionally, improvements are suggested for backstack safety in the popBackTo method and updating UI signatures to properly support navigation callbacks.
| import androidx.navigation3.runtime.NavKey | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| sealed interface SampleFeatureNavKey : NavKey |
There was a problem hiding this comment.
What is this sealed interface for?
9f04bfa to
ee2be57
Compare
8721853 to
dd9d509
Compare
| internal fun create( | ||
| backStack: NavBackStack<NavKey>, | ||
| entryProviderBuilder: EntryProviderScope<NavKey>.(Navigator) -> Unit, | ||
| ): Navigator = Navigator(backStack, entryProviderBuilder) |
There was a problem hiding this comment.
Is the static create function needed, if it has the same signature as the default constructor that it calls? Maybe you can remove it and make the constructor public 🤔
📝 Description