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

View File

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