diff --git a/build.gradle.kts b/build.gradle.kts index 48c59cb..6c804bf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,10 +10,11 @@ val linuxX64Target = "x86_64-unknown-linux-gnu" plugins { // Kotlin version must match compose version - 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.6.1" + kotlin("jvm") version "2.0.0" + kotlin("plugin.serialization") version "2.0.0" + id("com.google.devtools.ksp") version "2.0.0-1.0.21" + id("org.jetbrains.compose") version "1.6.10" + id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" } // Remember to update Constants.APP_VERSION when changing this version diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/diff/Diff.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/diff/Diff.kt index aa2e1cc..07f1da4 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/diff/Diff.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/diff/Diff.kt @@ -75,6 +75,7 @@ import java.io.FileInputStream import kotlin.math.max private const val MAX_MOVES_COUNT = 5 + @Composable private fun loadOrNull(key: Any, action: suspend () -> T?): T? { var result: T? by remember(key) { mutableStateOf(null) } @@ -805,8 +806,7 @@ fun HunkHeader( // Hunks options are only visible when repository is a normal state (not during merge/rebase) if ( (diffEntryType is DiffEntryType.SafeStagedDiff || diffEntryType is DiffEntryType.SafeUnstagedDiff) && - (diffEntryType is DiffEntryType.UncommittedDiff && // Added just to make smartcast work - diffEntryType.statusEntry.statusType == StatusType.MODIFIED) + diffEntryType.statusType == StatusType.MODIFIED ) { val buttonText: String val color: Color