Removed unnecessary loop
This commit is contained in:
parent
e59fe7df69
commit
ed704a629b
@ -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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user