diff --git a/core/src/commonMain/kotlin/ca/gosyer/jui/core/io/OkioExtensions.kt b/core/src/commonMain/kotlin/ca/gosyer/jui/core/io/OkioExtensions.kt index 8298f3d5..380f0090 100644 --- a/core/src/commonMain/kotlin/ca/gosyer/jui/core/io/OkioExtensions.kt +++ b/core/src/commonMain/kotlin/ca/gosyer/jui/core/io/OkioExtensions.kt @@ -37,4 +37,4 @@ suspend fun Source.copyTo(sink: BufferedSink) { fun ByteArray.source(): BufferedSource { return Buffer().write(this) -} \ No newline at end of file +} diff --git a/ios/src/uikitMain/kotlin/ca/gosyer/jui/ios/Main.kt b/ios/src/uikitMain/kotlin/ca/gosyer/jui/ios/Main.kt index 75a70491..70e25a02 100644 --- a/ios/src/uikitMain/kotlin/ca/gosyer/jui/ios/Main.kt +++ b/ios/src/uikitMain/kotlin/ca/gosyer/jui/ios/Main.kt @@ -97,7 +97,6 @@ class SkikoAppDelegate @OverrideInit constructor() : UIResponder(), UIApplicatio } } - @Composable fun ToastOverlay(modifier: Modifier, context: ContextWrapper) { var toast by remember { mutableStateOf?>(null) } @@ -121,26 +120,28 @@ fun ToastOverlay(modifier: Modifier, context: ContextWrapper) { } } @Suppress("NAME_SHADOWING") - (Crossfade( - toast?.first, - modifier = modifier - ) { toast -> - if (toast != null) { - Card( - Modifier.sizeIn(maxWidth = 200.dp), - shape = CircleShape, - backgroundColor = Color.DarkGray - ) { - Text( - toast, - Modifier.padding(horizontal = 16.dp, vertical = 8.dp), - color = Color.White, - maxLines = 2, - overflow = TextOverflow.Ellipsis, - fontSize = 12.sp, - textAlign = TextAlign.Center - ) + ( + Crossfade( + toast?.first, + modifier = modifier + ) { toast -> + if (toast != null) { + Card( + Modifier.sizeIn(maxWidth = 200.dp), + shape = CircleShape, + backgroundColor = Color.DarkGray + ) { + Text( + toast, + Modifier.padding(horizontal = 16.dp, vertical = 8.dp), + color = Color.White, + maxLines = 2, + overflow = TextOverflow.Ellipsis, + fontSize = 12.sp, + textAlign = TextAlign.Center + ) + } } } - }) + ) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt index a19043dc..dd35c91b 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt @@ -68,7 +68,7 @@ expect object LibraryDefaults { backgroundColor: Color = MaterialTheme.colors.background, contentColor: Color = contentColorFor(backgroundColor), badgeBackgroundColor: Color = MaterialTheme.colors.primary, - badgeContentColor: Color = contentColorFor(badgeBackgroundColor), + badgeContentColor: Color = contentColorFor(badgeBackgroundColor) ): LibraryColors val ContentPadding: PaddingValues } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/model/ReaderPageSeparator.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/model/ReaderPageSeparator.kt index 45870a52..8c6e408e 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/model/ReaderPageSeparator.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/model/ReaderPageSeparator.kt @@ -9,4 +9,4 @@ package ca.gosyer.jui.ui.reader.model data class ReaderPageSeparator( val previousChapter: ReaderChapter?, val nextChapter: ReaderChapter? -) : ReaderItem() \ No newline at end of file +) : ReaderItem() diff --git a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/file/IosFileSaver.kt b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/file/IosFileSaver.kt index 35e851e7..8442fc82 100644 --- a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/file/IosFileSaver.kt +++ b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/file/IosFileSaver.kt @@ -13,7 +13,7 @@ import okio.Sink actual class FileSaver( private val onFileSelected: (Sink) -> Unit, private val onCancel: () -> Unit, - private val onError: () -> Unit, + private val onError: () -> Unit ) { actual fun save(name: String) { TODO() diff --git a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/image/IosImageLoaderBuilder.kt b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/image/IosImageLoaderBuilder.kt index dcd172e1..8b9458c0 100644 --- a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/image/IosImageLoaderBuilder.kt +++ b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/base/image/IosImageLoaderBuilder.kt @@ -33,7 +33,11 @@ actual fun diskCache(contextWrapper: ContextWrapper, cacheDir: String): DiskCach private fun getCacheDir(): String { return NSFileManager.defaultManager.URLForDirectory( - NSCachesDirectory, NSUserDomainMask, null, true, null + NSCachesDirectory, + NSUserDomainMask, + null, + true, + null )!!.path.orEmpty() } diff --git a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/IosLicenses.kt b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/IosLicenses.kt index 2e2ad504..68f6059a 100644 --- a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/IosLicenses.kt +++ b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/IosLicenses.kt @@ -38,7 +38,7 @@ actual object LibraryDefaults { backgroundColor: Color, contentColor: Color, badgeBackgroundColor: Color, - badgeContentColor: Color, + badgeContentColor: Color ): LibraryColors = object : LibraryColors {} actual val ContentPadding: PaddingValues get() = PaddingValues() diff --git a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/components/DebugOverlayViewModel.kt b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/components/DebugOverlayViewModel.kt index 707e8e66..fe68bf4f 100644 --- a/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/components/DebugOverlayViewModel.kt +++ b/presentation/src/iosMain/kotlin/ca/gosyer/jui/ui/main/components/DebugOverlayViewModel.kt @@ -15,4 +15,4 @@ actual class DebugOverlayViewModel @Inject constructor(contextWrapper: ContextWr actual val maxMemory: String get() = "" actual val usedMemoryFlow: MutableStateFlow = MutableStateFlow("") -} \ No newline at end of file +} diff --git a/ui-core/src/iosArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt b/ui-core/src/iosArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt index 02896c16..4f8b3316 100644 --- a/ui-core/src/iosArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt +++ b/ui-core/src/iosArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt @@ -10,4 +10,4 @@ import dev.icerock.moko.resources.desc.PluralFormattedStringDesc import dev.icerock.moko.resources.desc.PluralStringDesc actual fun PluralStringDesc.localized(): String = localized() -actual fun PluralFormattedStringDesc.localized() = localized() \ No newline at end of file +actual fun PluralFormattedStringDesc.localized() = localized() diff --git a/ui-core/src/iosSimulatorArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt b/ui-core/src/iosSimulatorArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt index 02896c16..4f8b3316 100644 --- a/ui-core/src/iosSimulatorArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt +++ b/ui-core/src/iosSimulatorArm64Main/kotlin/ca/gosyer/jui/uicore/resources/IosStringResource.kt @@ -10,4 +10,4 @@ import dev.icerock.moko.resources.desc.PluralFormattedStringDesc import dev.icerock.moko.resources.desc.PluralStringDesc actual fun PluralStringDesc.localized(): String = localized() -actual fun PluralFormattedStringDesc.localized() = localized() \ No newline at end of file +actual fun PluralFormattedStringDesc.localized() = localized()