From 03a52cb4ce9e51e33f1fbfa41bc95c2b73d5cb98 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Sat, 22 Oct 2022 15:07:21 +0200 Subject: [PATCH] Removed submodules component --- .../jetpackduba/gitnuro/extensions/ModifierExtensions.kt | 7 ++++--- .../kotlin/com/jetpackduba/gitnuro/ui/RepositoryOpen.kt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt b/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt index b8dde1d..933cb72 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/extensions/ModifierExtensions.kt @@ -13,12 +13,13 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.key.onPreviewKeyEvent import androidx.compose.ui.input.pointer.* -fun Modifier.backgroundIf(condition: Boolean, color: Color): Modifier { +fun Modifier.backgroundIf(condition: Boolean, color: Color, elseColor: Color? = null): Modifier { return if (condition) { this.background(color) - } else { + } else if(elseColor != null) { + this.background(elseColor) + } else this - } } fun Modifier.handMouseClickable(onClick: () -> Unit): Modifier { diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/RepositoryOpen.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/RepositoryOpen.kt index d3e1df8..ffce706 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/RepositoryOpen.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/RepositoryOpen.kt @@ -352,7 +352,7 @@ fun MainContentView( Remotes() Tags() Stashes() - Submodules() +// TODO: Enable on 1.2.0 when fully implemented Submodules() } }