From 83e487e8fc94be9ed342c50b7f7f3fa86d8610c7 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 29 Aug 2021 19:18:45 +0530 Subject: [PATCH] common: fix desktop deprecations --- .../kotlin/dev/msfjarvis/claw/common/res/drawable.kt | 8 ++++---- .../kotlin/dev/msfjarvis/claw/common/ui/composables.kt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/res/drawable.kt b/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/res/drawable.kt index 36949570..f1790c5b 100644 --- a/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/res/drawable.kt +++ b/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/res/drawable.kt @@ -1,11 +1,11 @@ package dev.msfjarvis.claw.common.res import androidx.compose.runtime.Composable -import androidx.compose.ui.res.svgResource +import androidx.compose.ui.res.painterResource actual val commentIcon - @Composable get() = svgResource("comment_black_24px.svg") + @Composable get() = painterResource("comment_black_24px.svg") actual val heartIcon - @Composable get() = svgResource("favorite_black_24px.svg") + @Composable get() = painterResource("favorite_black_24px.svg") actual val heartBorderIcon - @Composable get() = svgResource("favorite_border_black_24px.svg") + @Composable get() = painterResource("favorite_border_black_24px.svg") diff --git a/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/ui/composables.kt b/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/ui/composables.kt index 6a04a819..5516528c 100644 --- a/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/ui/composables.kt +++ b/common/src/desktopMain/kotlin/dev/msfjarvis/claw/common/ui/composables.kt @@ -3,7 +3,7 @@ package dev.msfjarvis.claw.common.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import io.kamel.image.KamelImage -import io.kamel.image.lazyImageResource +import io.kamel.image.lazyPainterResource @Composable actual fun NetworkImage( @@ -12,7 +12,7 @@ actual fun NetworkImage( modifier: Modifier, ) { KamelImage( - resource = lazyImageResource(url), + resource = lazyPainterResource(url), contentDescription = contentDescription, modifier = Modifier.then(modifier), crossfade = true,