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 Dec 28, 2023
1 parent e1f58a6 commit 7280f54
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 7280f54

Please sign in to comment.