InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.98k stars 710 forks source link

Add route support to koinNavGraphViewModel() extension #1818

Closed SebastianHelzer closed 1 month ago

SebastianHelzer commented 6 months ago

Is your feature request related to a problem? Please describe. The koinNavGraphViewModel() extension is perfect for scoping ViewModels to nav graphs but when using the nav graph DSL graph ids are inaccessible.

Describe the solution you'd like It would be nice if the extension function also supports routes. This issue was reported earlier as https://github.com/InsertKoinIO/koin/issues/1476 and addressed in this PR https://github.com/InsertKoinIO/koin/pull/1473 but the issue and PR were closed without being merged in.

Describe alternatives you've considered Currently I use my own variant of the extension function which does support route based navigation. It would however be better if I could just use the koinNavGraphViewModel() extension function.

Target Koin project koin-androidx-navigation

SebastianHelzer commented 6 months ago

This will be resolved with the merging of #1819

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.