Skip to content

Commit

Permalink
Update compose version
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Dec 25, 2023
1 parent 547d881 commit 73f139f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ import com.github.terrakok.theme.LocalAppColor
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.jetbrains.compose.resources.LoadState
import org.jetbrains.compose.resources.orEmpty
import org.jetbrains.compose.resources.rememberImageBitmap
import org.jetbrains.compose.resources.resource
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.imageResource

@Composable
internal fun SelectColorExtractionImageButton() {
Expand Down Expand Up @@ -84,11 +82,7 @@ internal fun SelectColorExtractionImageButton() {
.width(IntrinsicSize.Max)
) {
ColorExtractionImage.entries.forEach { image ->
val loadState = resource(image.imageResource).rememberImageBitmap()
val imageBitmap = when (loadState) {
is LoadState.Success -> loadState.value
else -> null
}
val imageBitmap = imageResource(DrawableResource(image.imageResource))
Row(
Modifier
.fillMaxWidth()
Expand All @@ -101,7 +95,7 @@ internal fun SelectColorExtractionImageButton() {
verticalAlignment = Alignment.CenterVertically
) {
Image(
bitmap = loadState.orEmpty(),
bitmap = imageBitmap,
contentDescription = image.imageName,
Modifier
.size(40.dp)
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]

kotlin = "1.9.20"
agp = "8.1.4"
compose = "1.5.10"
kotlin = "1.9.21"
agp = "8.2.0"
compose = "1.6.0-dev1347"
androidx-appcompat = "1.6.1"
androidx-activityCompose = "1.8.1"
androidx-activityCompose = "1.8.2"
compose-uitooling = "1.5.4"
materialKolor = "1.2.8"
materialKolor = "1.2.9"

[libraries]

Expand Down

0 comments on commit 73f139f

Please sign in to comment.