mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
common: run spotless
This commit is contained in:
parent
80a985bf2d
commit
ba1ae16e87
3 changed files with 18 additions and 25 deletions
|
@ -37,11 +37,7 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val androidTest by getting { dependsOn(androidAndroidTestRelease) }
|
val androidTest by getting { dependsOn(androidAndroidTestRelease) }
|
||||||
val desktopMain by getting {
|
val desktopMain by getting { dependencies { implementation(libs.kamel.image) } }
|
||||||
dependencies {
|
|
||||||
implementation(libs.kamel.image)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val desktopTest by getting
|
val desktopTest by getting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,14 @@ actual fun NetworkImage(
|
||||||
modifier: Modifier,
|
modifier: Modifier,
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
painter = rememberImagePainter(
|
painter =
|
||||||
data = url,
|
rememberImagePainter(
|
||||||
builder = {
|
data = url,
|
||||||
transformations(CircleCropTransformation())
|
builder = {
|
||||||
crossfade(true)
|
transformations(CircleCropTransformation())
|
||||||
},
|
crossfade(true)
|
||||||
),
|
},
|
||||||
|
),
|
||||||
contentDescription = contentDescription,
|
contentDescription = contentDescription,
|
||||||
modifier = Modifier.then(modifier),
|
modifier = Modifier.then(modifier),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,24 +1,20 @@
|
||||||
package dev.msfjarvis.claw.common.ui
|
package dev.msfjarvis.claw.common.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.requiredSize
|
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import io.kamel.image.KamelImage
|
import io.kamel.image.KamelImage
|
||||||
import io.kamel.image.lazyImageResource
|
import io.kamel.image.lazyImageResource
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun NetworkImage(
|
actual fun NetworkImage(
|
||||||
url: String,
|
url: String,
|
||||||
contentDescription: String,
|
contentDescription: String,
|
||||||
modifier: Modifier,
|
modifier: Modifier,
|
||||||
) {
|
) {
|
||||||
KamelImage(
|
KamelImage(
|
||||||
resource = lazyImageResource(url),
|
resource = lazyImageResource(url),
|
||||||
contentDescription = contentDescription,
|
contentDescription = contentDescription,
|
||||||
modifier = Modifier.then(modifier),
|
modifier = Modifier.then(modifier),
|
||||||
crossfade = true,
|
crossfade = true,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue