Removed unnecessary loop

This commit is contained in:
Abdelilah El Aissaoui 2024-08-02 20:43:49 +02:00
parent e59fe7df69
commit ed704a629b
No known key found for this signature in database
GPG Key ID: 7587FC860F594869
2 changed files with 2 additions and 9 deletions

View File

@ -309,7 +309,6 @@ class App {
}, },
onTabClosed = onCloseTab, onTabClosed = onCloseTab,
onAddNewTab = onAddedTab, onAddNewTab = onAddedTab,
tabsHeight = 36.dp,
onMoveTab = { fromIndex, toIndex -> onMoveTab = { fromIndex, toIndex ->
tabsManager.onMoveTab(fromIndex, toIndex) tabsManager.onMoveTab(fromIndex, toIndex)
}, },
@ -345,12 +344,7 @@ private fun TabContent(tabs: List<TabInformation>, currentTab: TabInformation?)
.fillMaxSize(), .fillMaxSize(),
) { ) {
if (currentTab != null) { if (currentTab != null) {
for (tab in tabs) { AppTab(currentTab.tabViewModel)
if (tab == currentTab) {
AppTab(currentTab.tabViewModel)
}
}
} }
} }
} }

View File

@ -47,7 +47,6 @@ import kotlin.io.path.name
fun RepositoriesTabPanel( fun RepositoriesTabPanel(
tabs: List<TabInformation>, tabs: List<TabInformation>,
currentTab: TabInformation?, currentTab: TabInformation?,
tabsHeight: Dp,
onTabSelected: (TabInformation) -> Unit, onTabSelected: (TabInformation) -> Unit,
onTabClosed: (TabInformation) -> Unit, onTabClosed: (TabInformation) -> Unit,
onMoveTab: (Int, Int) -> Unit, onMoveTab: (Int, Int) -> Unit,
@ -99,7 +98,7 @@ fun RepositoriesTabPanel(
Row { Row {
LazyRow( LazyRow(
modifier = Modifier modifier = Modifier
.height(tabsHeight) .height(36.dp)
.weight(1f, false) .weight(1f, false)
.horizontalDragContainer( .horizontalDragContainer(
dragDropState = dragDropState, dragDropState = dragDropState,