diff --git a/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/App.android.kt b/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/App.android.kt index 18e850b..aad08da 100644 --- a/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/App.android.kt +++ b/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/App.android.kt @@ -26,13 +26,3 @@ class AppActivity : ComponentActivity() { } } } - -internal actual fun openUrl(url: String?) { - val uri = url?.let { Uri.parse(it) } ?: return - val intent = Intent().apply { - action = Intent.ACTION_VIEW - data = uri - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - } - AndroidApp.INSTANCE.startActivity(intent) -} \ No newline at end of file diff --git a/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.android.kt b/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.android.kt deleted file mode 100644 index d8769b5..0000000 --- a/sample/composeApp/src/androidMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.android.kt +++ /dev/null @@ -1,24 +0,0 @@ -package dev.darkokoa.datetimewheelpicker.theme - -import android.app.Activity -import android.graphics.Color -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat - -@Composable -internal actual fun SystemAppearance(isDark: Boolean) { - val view = LocalView.current - val systemBarColor = Color.TRANSPARENT - LaunchedEffect(isDark) { - val window = (view.context as Activity).window - WindowCompat.setDecorFitsSystemWindows(window, false) - window.statusBarColor = systemBarColor - window.navigationBarColor = systemBarColor - WindowCompat.getInsetsController(window, window.decorView).apply { - isAppearanceLightStatusBars = isDark - isAppearanceLightNavigationBars = isDark - } - } -} \ No newline at end of file diff --git a/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/App.kt b/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/App.kt index f3c4644..7c5de84 100644 --- a/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/App.kt +++ b/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/App.kt @@ -67,5 +67,3 @@ internal fun App() = AppTheme { } } } - -internal expect fun openUrl(url: String?) \ No newline at end of file diff --git a/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.kt b/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.kt index 89a45ff..bce488e 100644 --- a/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.kt +++ b/sample/composeApp/src/commonMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.kt @@ -60,7 +60,6 @@ internal fun AppTheme( LocalThemeIsDark provides isDarkState ) { val isDark by isDarkState - SystemAppearance(!isDark) MaterialTheme( colorScheme = if (isDark) DarkColorScheme else LightColorScheme, typography = AppTypography, @@ -71,6 +70,3 @@ internal fun AppTheme( ) } } - -@Composable -internal expect fun SystemAppearance(isDark: Boolean) diff --git a/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/App.ios.kt b/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/App.ios.kt deleted file mode 100644 index 740b3c1..0000000 --- a/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/App.ios.kt +++ /dev/null @@ -1,9 +0,0 @@ -package dev.darkokoa.datetimewheelpicker - -import platform.Foundation.NSURL -import platform.UIKit.UIApplication - -internal actual fun openUrl(url: String?) { - val nsUrl = url?.let { NSURL.URLWithString(it) } ?: return - UIApplication.sharedApplication.openURL(nsUrl) -} \ No newline at end of file diff --git a/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.ios.kt b/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.ios.kt deleted file mode 100644 index 289b69c..0000000 --- a/sample/composeApp/src/iosMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.ios.kt +++ /dev/null @@ -1,17 +0,0 @@ -package dev.darkokoa.datetimewheelpicker.theme - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import platform.UIKit.UIApplication -import platform.UIKit.UIStatusBarStyleDarkContent -import platform.UIKit.UIStatusBarStyleLightContent -import platform.UIKit.setStatusBarStyle - -@Composable -internal actual fun SystemAppearance(isDark: Boolean) { - LaunchedEffect(isDark) { - UIApplication.sharedApplication.setStatusBarStyle( - if (isDark) UIStatusBarStyleDarkContent else UIStatusBarStyleLightContent - ) - } -} \ No newline at end of file diff --git a/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/App.js.kt b/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/App.js.kt deleted file mode 100644 index 9a3fafa..0000000 --- a/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/App.js.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.darkokoa.datetimewheelpicker - -import kotlinx.browser.window - -internal actual fun openUrl(url: String?) { - url?.let { window.open(it) } -} \ No newline at end of file diff --git a/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.js.kt b/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.js.kt deleted file mode 100644 index 7ee49c1..0000000 --- a/sample/composeApp/src/jsMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.js.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.darkokoa.datetimewheelpicker.theme - -import androidx.compose.runtime.Composable - -@Composable -internal actual fun SystemAppearance(isDark: Boolean) { -} \ No newline at end of file diff --git a/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/App.jvm.kt b/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/App.jvm.kt deleted file mode 100644 index 96e2cd2..0000000 --- a/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/App.jvm.kt +++ /dev/null @@ -1,9 +0,0 @@ -package dev.darkokoa.datetimewheelpicker - -import java.awt.Desktop -import java.net.URI - -internal actual fun openUrl(url: String?) { - val uri = url?.let { URI.create(it) } ?: return - Desktop.getDesktop().browse(uri) -} \ No newline at end of file diff --git a/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.jvm.kt b/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.jvm.kt deleted file mode 100644 index 7ee49c1..0000000 --- a/sample/composeApp/src/jvmMain/kotlin/dev/darkokoa/datetimewheelpicker/theme/Theme.jvm.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.darkokoa.datetimewheelpicker.theme - -import androidx.compose.runtime.Composable - -@Composable -internal actual fun SystemAppearance(isDark: Boolean) { -} \ No newline at end of file