Updated compose to 1.6.0

This commit is contained in:
Abdelilah El Aissaoui 2024-03-05 23:12:28 +01:00
parent 52f699d13e
commit fb3b7fabae
No known key found for this signature in database
GPG Key ID: 7587FC860F594869
2 changed files with 9 additions and 2 deletions

View File

@ -13,7 +13,7 @@ plugins {
kotlin("jvm") version "1.9.20"
kotlin("plugin.serialization") version "1.9.20"
id("com.google.devtools.ksp") version "1.9.20-1.0.14"
id("org.jetbrains.compose") version "1.5.11"
id("org.jetbrains.compose") version "1.6.0"
}
// Remember to update Constants.APP_VERSION when changing this version

View File

@ -71,11 +71,18 @@ import org.eclipse.jgit.submodule.SubmoduleStatusType
import org.jetbrains.compose.animatedimage.Blank
import org.jetbrains.compose.animatedimage.animate
import org.jetbrains.compose.animatedimage.loadAnimatedImage
import org.jetbrains.compose.resources.loadOrNull
import java.io.FileInputStream
import kotlin.math.max
private const val MAX_MOVES_COUNT = 5
@Composable
private fun <T> loadOrNull(key: Any, action: suspend () -> T?): T? {
var result: T? by remember(key) { mutableStateOf(null) }
LaunchedEffect(Unit) {
result = action()
}
return result
}
@Composable
fun Diff(