Skip to content

Commit

Permalink
fix: composable invocation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
y9san9 committed Feb 18, 2024
1 parent 3b72883 commit 9ba33ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("NAME_SHADOWING")

package app.meetacy.di.android.compose.navigation

import androidx.compose.runtime.*
Expand Down Expand Up @@ -26,6 +28,10 @@ public fun NavigationScreen(
}

@Composable
public fun buildNavigationDI(di: DI): DI = di + di {
val navController by provider { LocalNavController.current }
public fun buildNavigationDI(di: DI): DI {
val navController = LocalNavController.current

return di + di {
val navController by constant(navController)
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ composeCompiler = "1.5.6"
androidxNavigation = "2.7.7"
lifecycle = "2.6.1"

mdi = "0.0.33"
mdi = "0.0.34"

[libraries]

Expand Down

0 comments on commit 9ba33ef

Please sign in to comment.