From 55ebd9ee0d69bb71eb4ebabbc7a6150f44dffb63 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Sun, 19 Jun 2022 16:35:09 +0200 Subject: [PATCH] Removed no longer valid TODOs --- .../kotlin/app/credentials/GRemoteSession.kt | 1 - src/main/kotlin/app/git/RebaseManager.kt | 20 +++++++++---------- .../git/graph/UncommitedChangesGraphNode.kt | 2 +- src/main/kotlin/app/theme/ColorsScheme.kt | 2 +- src/main/kotlin/app/ui/AppTab.kt | 2 -- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/main/kotlin/app/credentials/GRemoteSession.kt b/src/main/kotlin/app/credentials/GRemoteSession.kt index ef38ffe..782e456 100644 --- a/src/main/kotlin/app/credentials/GRemoteSession.kt +++ b/src/main/kotlin/app/credentials/GRemoteSession.kt @@ -67,7 +67,6 @@ class GRemoteSession @Inject constructor( var credentials = credentialsStateManager.currentCredentialsState while (credentials is CredentialsState.CredentialsRequested) { - // TODO check if support for ED25519 with pwd can be added credentials = credentialsStateManager.currentCredentialsState } diff --git a/src/main/kotlin/app/git/RebaseManager.kt b/src/main/kotlin/app/git/RebaseManager.kt index bf5ab12..d544656 100644 --- a/src/main/kotlin/app/git/RebaseManager.kt +++ b/src/main/kotlin/app/git/RebaseManager.kt @@ -48,18 +48,18 @@ class RebaseManager @Inject constructor( .call() } - suspend fun rebaseInteractive(git: Git, interactiveHandler: InteractiveHandler, commit: RevCommit) { - //TODO Check possible rebase errors by checking the result - val rebaseResult = git.rebase() - .runInteractively(interactiveHandler) - .setOperation(RebaseCommand.Operation.BEGIN) - .setUpstream(commit) - .call() + suspend fun rebaseInteractive(git: Git, interactiveHandler: InteractiveHandler, commit: RevCommit) = + withContext(Dispatchers.IO) { + val rebaseResult = git.rebase() + .runInteractively(interactiveHandler) + .setOperation(RebaseCommand.Operation.BEGIN) + .setUpstream(commit) + .call() - if (rebaseResult.status == RebaseResult.Status.FAILED) { - throw UncommitedChangesDetectedException("Rebase interactive failed.") + if (rebaseResult.status == RebaseResult.Status.FAILED) { + throw UncommitedChangesDetectedException("Rebase interactive failed.") + } } - } suspend fun rebaseLinesFullMessage( git: Git, diff --git a/src/main/kotlin/app/git/graph/UncommitedChangesGraphNode.kt b/src/main/kotlin/app/git/graph/UncommitedChangesGraphNode.kt index f1218db..f8c1db6 100644 --- a/src/main/kotlin/app/git/graph/UncommitedChangesGraphNode.kt +++ b/src/main/kotlin/app/git/graph/UncommitedChangesGraphNode.kt @@ -7,7 +7,7 @@ class UncommitedChangesGraphNode : GraphNode(ObjectId(0, 0, 0, 0, 0)) { var graphParent: GraphNode? = null override val graphParentCount: Int - get() = 1 // TODO: Check what happens with an empty tree + get() = 1 // Uncommited changes can have a max of 1 parent commit override fun getGraphParent(nth: Int): GraphNode { return requireNotNull(graphParent) diff --git a/src/main/kotlin/app/theme/ColorsScheme.kt b/src/main/kotlin/app/theme/ColorsScheme.kt index 32888a1..7fbdfda 100644 --- a/src/main/kotlin/app/theme/ColorsScheme.kt +++ b/src/main/kotlin/app/theme/ColorsScheme.kt @@ -42,7 +42,7 @@ data class ColorsScheme( onBackground = this.primaryText, onSurface = this.primaryText, onError = this.onError, - isLight = true, // todo what is this used for? Hardcoded value for now + isLight = true, // property specific for some colors, we don't care about this as all our components are customized ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/ui/AppTab.kt b/src/main/kotlin/app/ui/AppTab.kt index e7a27d1..0c7ebcb 100644 --- a/src/main/kotlin/app/ui/AppTab.kt +++ b/src/main/kotlin/app/ui/AppTab.kt @@ -25,8 +25,6 @@ import app.viewmodels.RepositorySelectionStatus import app.viewmodels.TabViewModel import kotlinx.coroutines.delay -// TODO onDispose sometimes is called when changing tabs, therefore losing the tab state -@OptIn(ExperimentalAnimationApi::class) @Composable fun AppTab( tabViewModel: TabViewModel,