diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/UncommitedChanges.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/UncommitedChanges.kt index 4a3839d..55f2ce9 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/UncommitedChanges.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/UncommitedChanges.kt @@ -198,7 +198,8 @@ fun UncommitedChanges( Text( text = text, - style = MaterialTheme.typography.body2.copy(color = MaterialTheme.colors.primaryVariant), + style = MaterialTheme.typography.body2, + color = MaterialTheme.colors.primaryVariant, ) }, colors = textFieldColors(), diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt index f41316d..ebade54 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt @@ -28,6 +28,7 @@ import com.jetpackduba.gitnuro.LocalTabScope import com.jetpackduba.gitnuro.credentials.CredentialsStateManager import com.jetpackduba.gitnuro.di.AppComponent import com.jetpackduba.gitnuro.di.DaggerTabComponent +import com.jetpackduba.gitnuro.di.TabComponent import com.jetpackduba.gitnuro.extensions.handMouseClickable import com.jetpackduba.gitnuro.extensions.handOnHover import com.jetpackduba.gitnuro.preferences.AppSettings @@ -51,14 +52,13 @@ fun RepositoriesTabPanel( LaunchedEffect(selectedTabKey) { val index = tabs.indexOfFirst { it.key == selectedTabKey } - + // todo sometimes it scrolls to (index - 1) for some weird reason if (index > -1) { stateHorizontal.scrollToItem(index) } } - Row { Box( modifier = Modifier @@ -221,7 +221,7 @@ class TabInformation( val path: String?, appComponent: AppComponent, ) { - val tabComponent = DaggerTabComponent.builder() + private val tabComponent: TabComponent = DaggerTabComponent.builder() .appComponent(appComponent) .build() @@ -237,7 +237,6 @@ class TabInformation( init { tabComponent.inject(this) - //TODO: This shouldn't be here, should be in the parent method tabViewModel.onRepositoryChanged = { path -> if (path == null) { appStateManager.repositoryTabRemoved(key) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuEntry.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuEntry.kt index 1fcd55b..a141b05 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuEntry.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuEntry.kt @@ -26,7 +26,7 @@ fun SideMenuEntry( icon: Painter? = null, itemsCount: Int, isExpanded: Boolean, - hoverIcon: @Composable() (() -> Unit)? = null, + hoverIcon: @Composable (() -> Unit)? = null, ) { val hoverInteraction = remember { MutableInteractionSource() } val isHovered by hoverInteraction.collectIsHoveredAsState() @@ -35,7 +35,6 @@ fun SideMenuEntry( modifier = Modifier .height(36.dp) .fillMaxWidth() -// .background(color = MaterialTheme.colors.headerBackground) .hoverable(hoverInteraction), verticalAlignment = Alignment.CenterVertically, ) { diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuPanel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuPanel.kt index 1428fb8..daa5322 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuPanel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/SideMenuPanel.kt @@ -1,6 +1,5 @@ package com.jetpackduba.gitnuro.ui.components -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.runtime.Composable @@ -9,7 +8,6 @@ import androidx.compose.ui.graphics.painter.Painter import com.jetpackduba.gitnuro.ui.context_menu.ContextMenu import com.jetpackduba.gitnuro.ui.context_menu.ContextMenuElement -@OptIn(ExperimentalFoundationApi::class) @Composable fun SideMenuPanel( title: String, diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/LogViewModel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/LogViewModel.kt index b6a0c4d..f210276 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/LogViewModel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/viewmodels/LogViewModel.kt @@ -83,7 +83,7 @@ class LogViewModel @Inject constructor( val scrollToUncommitedChanges: Flow = tabState.taskEvent .filterIsInstance() .map { it.selectedItem } - .filterIsInstance() + .filterIsInstance() private val _focusCommit = MutableSharedFlow() val focusCommit: Flow = merge(_focusCommit, scrollToItem)