Updated JGit and Compose dependencies

This commit is contained in:
Abdelilah El Aissaoui 2023-04-08 22:33:05 +02:00
parent 8e14696bdf
commit cb88826e0a
No known key found for this signature in database
GPG Key ID: 7587FC860F594869
6 changed files with 15 additions and 26 deletions

View File

@ -9,7 +9,7 @@ plugins {
kotlin("jvm") version "1.7.10"
kotlin("kapt") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
id("org.jetbrains.compose") version "1.3.1"
id("org.jetbrains.compose") version "1.4.0-rc03"
}
// Remember to update Constants.APP_VERSION when changing this version
@ -26,7 +26,7 @@ repositories {
}
dependencies {
val jgit = "6.4.0.202211300538-r"
val jgit = "6.5.0.202303070854-r"
implementation(compose.desktop.currentOs)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)

View File

@ -49,7 +49,7 @@ fun Modifier.ignoreKeyEvents(): Modifier {
@OptIn(ExperimentalComposeUiApi::class)
fun Modifier.handOnHover(): Modifier {
return this.pointerHoverIcon(PointerIconDefaults.Hand)
return this.pointerHoverIcon(PointerIcon.Hand)
}
// TODO Try to restore hover that was shown with clickable modifier

View File

@ -56,6 +56,8 @@ class CloneRepositoryUseCase @Inject constructor(
override fun isCancelled(): Boolean {
return !isActive
}
override fun showDuration(enabled: Boolean) {}
}
)
.setTransportConfigCallback { handleTransportUseCase(it, null) }

View File

@ -39,6 +39,8 @@ class FetchAllBranchesUseCase @Inject constructor(
override fun endTask() {}
override fun isCancelled(): Boolean = isActive
override fun showDuration(enabled: Boolean) {}
})
.call()
}

View File

@ -31,6 +31,7 @@ class PushBranchUseCase @Inject constructor(
override fun update(completed: Int) {}
override fun endTask() {}
override fun isCancelled() = !isActive
override fun showDuration(enabled: Boolean) {}
})
.call()

View File

@ -1,7 +1,7 @@
package com.jetpackduba.gitnuro.git.submodules
import com.jetpackduba.gitnuro.logging.printLog
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.isActive
import kotlinx.coroutines.withContext
import org.eclipse.jgit.api.CloneCommand
import org.eclipse.jgit.api.Git
@ -28,31 +28,15 @@ class UpdateSubmoduleUseCase @Inject constructor() {
override fun checkingOut(commit: AnyObjectId?, path: String?) {
}
}
)
.setProgressMonitor(object : ProgressMonitor {
override fun start(totalTasks: Int) {
printLog(TAG, "start $totalTasks")
}
override fun beginTask(title: String?, totalWork: Int) {
printLog(TAG, "being task $title $totalWork")
}
override fun update(completed: Int) {
printLog(TAG, "Completed $completed")
}
override fun endTask() {
printLog(TAG, "endtask")
}
override fun isCancelled(): Boolean {
printLog(TAG, "isCancelled")
return false
}
override fun start(totalTasks: Int) {}
override fun beginTask(title: String?, totalWork: Int) {}
override fun update(completed: Int) {}
override fun endTask() {}
override fun isCancelled(): Boolean = !isActive
override fun showDuration(enabled: Boolean) {}
})
.call()
}