From 589daf133e0241362e7e683c19aa946fb23d4d55 Mon Sep 17 00:00:00 2001 From: Grzegorz Bobryk Date: Thu, 14 Sep 2023 10:26:24 +0200 Subject: [PATCH] [maintenance] androidContext readability Improved readability by removing double usage of `listOf` and `module`. --- .../java/org/koin/android/ext/koin/KoinExt.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt index 8d7ffcf39..52715c520 100644 --- a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt +++ b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt @@ -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 }