Skip to content

Commit

Permalink
remove already overriden property from NavBackEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Aug 30, 2024
1 parent a74e470 commit 5e8aa68
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import androidx.lifecycle.viewmodel.CreationExtras
import androidx.navigation.NavBackStackEntry
import org.koin.core.annotation.KoinInternalApi

@OptIn(KoinInternalApi::class)
fun defaultNavExtras(viewModelStoreOwner: ViewModelStoreOwner): CreationExtras = when {
viewModelStoreOwner is NavBackStackEntry -> viewModelStoreOwner.defaultViewModelCreationExtras
viewModelStoreOwner is HasDefaultViewModelProviderFactory -> viewModelStoreOwner.defaultViewModelCreationExtras
else -> CreationExtras.Empty
}

0 comments on commit 5e8aa68

Please sign in to comment.