From 4b43db02778b025f825a6bf5547fda716e0bcdf8 Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Mon, 24 Jun 2024 11:01:44 +0100 Subject: [PATCH 1/2] Pass currentCompositionLocalContext to iOS bottom sheet content --- .../calf/ui/sheet/AdaptiveBottomSheet.ios.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt index 56695bb..cd3e618 100644 --- a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt +++ b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt @@ -28,9 +28,7 @@ actual fun AdaptiveBottomSheet( windowInsets: WindowInsets, content: @Composable() (ColumnScope.() -> Unit) ) { - val colorScheme = MaterialTheme.colorScheme - val typography = MaterialTheme.typography - val shapes = MaterialTheme.shapes + val compositionLocalContext = currentCompositionLocalContext val sheetHelper = remember { BottomSheetManager( @@ -38,11 +36,7 @@ actual fun AdaptiveBottomSheet( onDismissRequest() }, content = { - MaterialTheme( - colorScheme = colorScheme, - typography = typography, - shapes = shapes, - ) { + CompositionLocalProvider(compositionLocalContext) { Column( modifier = Modifier.fillMaxSize() ) { From 5acd045d9c95a80d2a87fed3dc5e2ae649ee2bf7 Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Thu, 27 Jun 2024 20:35:20 +0100 Subject: [PATCH 2/2] Update package name --- .../mohamedrejeb/calf/picker/platform/mac/MacOSFilePicker.kt | 4 ++-- .../calf/picker/platform/mac/foundation/Foundation.kt | 2 +- .../calf/picker/platform/mac/foundation/FoundationLibrary.kt | 2 +- .../mohamedrejeb/calf/picker/platform/mac/foundation/ID.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/MacOSFilePicker.kt b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/MacOSFilePicker.kt index 90e539d..8d830a8 100644 --- a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/MacOSFilePicker.kt +++ b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/MacOSFilePicker.kt @@ -3,8 +3,8 @@ package com.mohamedrejeb.calf.picker.platform.mac import com.mohamedrejeb.calf.picker.FilePickerFileType import com.mohamedrejeb.calf.picker.FilePickerSelectionMode import com.mohamedrejeb.calf.picker.platform.PlatformFilePicker -import io.github.vinceglb.filekit.core.platform.mac.foundation.Foundation -import io.github.vinceglb.filekit.core.platform.mac.foundation.ID +import com.mohamedrejeb.calf.picker.platform.mac.foundation.Foundation +import com.mohamedrejeb.calf.picker.platform.mac.foundation.ID import jodd.net.MimeTypes import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/Foundation.kt b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/Foundation.kt index b16efb6..810a7ee 100644 --- a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/Foundation.kt +++ b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/Foundation.kt @@ -1,4 +1,4 @@ -package io.github.vinceglb.filekit.core.platform.mac.foundation +package com.mohamedrejeb.calf.picker.platform.mac.foundation import com.sun.jna.Callback import com.sun.jna.Function diff --git a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/FoundationLibrary.kt b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/FoundationLibrary.kt index 4c95ad9..55bc9de 100644 --- a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/FoundationLibrary.kt +++ b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/FoundationLibrary.kt @@ -1,4 +1,4 @@ -package io.github.vinceglb.filekit.core.platform.mac.foundation +package com.mohamedrejeb.calf.picker.platform.mac.foundation import com.sun.jna.Callback import com.sun.jna.Library diff --git a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/ID.kt b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/ID.kt index 78c8057..30d25b8 100644 --- a/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/ID.kt +++ b/calf-file-picker/src/desktopMain/kotlin/com/mohamedrejeb/calf/picker/platform/mac/foundation/ID.kt @@ -1,4 +1,4 @@ -package io.github.vinceglb.filekit.core.platform.mac.foundation +package com.mohamedrejeb.calf.picker.platform.mac.foundation import com.sun.jna.NativeLong