Skip to content

Commit

Permalink
[maintenance] androidContext readability
Browse files Browse the repository at this point in the history
Improved readability by removing double usage of `listOf` and `module`.
  • Loading branch information
GrzegorzBobryk committed Jun 3, 2024
1 parent 04e7ecf commit 482942a
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication {
koin.logger.info("[init] declare Android Context")
}

if (androidContext is Application) {
koin.loadModules(listOf(module {
single { androidContext } bind Context::class
}))
} else {
koin.loadModules(listOf(module {
single { androidContext }
}))
}
koin.loadModules(listOf(
module {
if (androidContext is Application) {
single { androidContext } bind Context::class
} else {
single { androidContext }
}
}
))

return this
}
Expand Down

0 comments on commit 482942a

Please sign in to comment.