From be7e78cf797ae38fe5e2cd061a65672e2f749e45 Mon Sep 17 00:00:00 2001 From: Nikita Lipsky Date: Tue, 25 Jul 2023 11:48:13 +0300 Subject: [PATCH] Widgets gallery: fix for mismatched @Composable annotation (#3402) * Widgets gallery: fix for mismatched @Composable annotation * Widgets gallery: remove isSystemInDarkTheme expect function --- .../org/jetbrains/compose/demo/widgets/platform/System.kt | 8 -------- .../org/jetbrains/compose/demo/widgets/platform/System.kt | 3 --- .../org/jetbrains/compose/demo/widgets/theme/Theme.kt | 2 +- .../org/jetbrains/compose/demo/widgets/platform/System.kt | 7 ------- 4 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt delete mode 100644 examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt delete mode 100644 examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt diff --git a/examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt b/examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt deleted file mode 100644 index be73331ce2..0000000000 --- a/examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.jetbrains.compose.demo.widgets.platform - -import androidx.compose.runtime.Composable -import androidx.compose.foundation.isSystemInDarkTheme as androidSystemIsInDarkTheme - -@Composable -actual fun isSystemInDarkTheme(): Boolean = - androidSystemIsInDarkTheme() \ No newline at end of file diff --git a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt deleted file mode 100644 index 3050d9f245..0000000000 --- a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.jetbrains.compose.demo.widgets.platform - -expect fun isSystemInDarkTheme(): Boolean \ No newline at end of file diff --git a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt index 64ec9f8344..32302d11b1 100644 --- a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt +++ b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt @@ -5,7 +5,7 @@ import androidx.compose.material.darkColors import androidx.compose.material.lightColors import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color -import org.jetbrains.compose.demo.widgets.platform.isSystemInDarkTheme +import androidx.compose.foundation.isSystemInDarkTheme import org.jetbrains.compose.demo.widgets.theme.ColorPallet.* // dark palettes diff --git a/examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt b/examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt deleted file mode 100644 index 80ad261e81..0000000000 --- a/examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.compose.demo.widgets.platform - -import androidx.compose.runtime.Composable -import org.jetbrains.skiko.SystemTheme - -@Composable -actual fun isSystemInDarkTheme(): Boolean = org.jetbrains.skiko.currentSystemTheme == SystemTheme.DARK