From b7a2a60e6d0cd9c0913530d280a8f3ab2adea98c Mon Sep 17 00:00:00 2001 From: GeorgCantor Date: Sat, 14 Sep 2024 16:53:33 +0300 Subject: [PATCH] Update IDEAndroidCommonLayoutXmlFileManager.kt --- .../idea/res/IDEAndroidCommonLayoutXmlFileManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android-kotlin/android-extensions-idea-common/src/org/jetbrains/kotlin/android/synthetic/idea/res/IDEAndroidCommonLayoutXmlFileManager.kt b/android-kotlin/android-extensions-idea-common/src/org/jetbrains/kotlin/android/synthetic/idea/res/IDEAndroidCommonLayoutXmlFileManager.kt index 848ae18e1ec..a8388907209 100644 --- a/android-kotlin/android-extensions-idea-common/src/org/jetbrains/kotlin/android/synthetic/idea/res/IDEAndroidCommonLayoutXmlFileManager.kt +++ b/android-kotlin/android-extensions-idea-common/src/org/jetbrains/kotlin/android/synthetic/idea/res/IDEAndroidCommonLayoutXmlFileManager.kt @@ -107,7 +107,7 @@ open class IDEAndroidCommonLayoutXmlFileManager(val module: Module) : AndroidLay private fun SourceProviderMirror.toVariant() = let { val list = resDirectories.mapNotNull { it.canonicalPath } - val fixedName = if (name != "") name else "main" // IdeaSourceProvider's for legacy projects rename the main source set. + val fixedName = name.ifEmpty { "main" } // IdeaSourceProvider's for legacy projects rename the main source set. AndroidVariant(fixedName, list) } @@ -120,4 +120,4 @@ open class IDEAndroidCommonLayoutXmlFileManager(val module: Module) : AndroidLay } return AndroidModule(applicationPackage, sourceProviders.map { it.toVariant() }) } -} \ No newline at end of file +}