Moved fetch button back to dropdown
This commit is contained in:
parent
31d5a98f2e
commit
31712cd846
@ -51,22 +51,20 @@ fun Menu(
|
|||||||
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
||||||
MenuButton(
|
|
||||||
modifier = Modifier.padding(end = 4.dp),
|
|
||||||
title = "Fetch",
|
|
||||||
icon = painterResource("fetch.svg"),
|
|
||||||
onClick = { menuViewModel.fetchAll() },
|
|
||||||
)
|
|
||||||
|
|
||||||
ExtendedMenuButton(
|
ExtendedMenuButton(
|
||||||
modifier = Modifier.padding(end = 4.dp),
|
modifier = Modifier.padding(end = 4.dp),
|
||||||
title = "Pull",
|
title = "Pull",
|
||||||
icon = painterResource("download.svg"),
|
icon = painterResource("download.svg"),
|
||||||
onClick = { menuViewModel.pull() },
|
onClick = { menuViewModel.pull() },
|
||||||
extendedListItems = pullContextMenuItems {
|
extendedListItems = pullContextMenuItems(
|
||||||
|
onPullRebase = {
|
||||||
menuViewModel.pull(true)
|
menuViewModel.pull(true)
|
||||||
|
},
|
||||||
|
onFetchAll = {
|
||||||
|
menuViewModel.fetchAll()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
ExtendedMenuButton(
|
ExtendedMenuButton(
|
||||||
title = "Push",
|
title = "Push",
|
||||||
|
@ -4,11 +4,16 @@ import androidx.compose.foundation.ExperimentalFoundationApi
|
|||||||
|
|
||||||
fun pullContextMenuItems(
|
fun pullContextMenuItems(
|
||||||
onPullRebase: () -> Unit,
|
onPullRebase: () -> Unit,
|
||||||
|
onFetchAll: () -> Unit,
|
||||||
): List<DropDownContentData> {
|
): List<DropDownContentData> {
|
||||||
return mutableListOf(
|
return mutableListOf(
|
||||||
DropDownContentData(
|
DropDownContentData(
|
||||||
label = "Pull with rebase",
|
label = "Pull with rebase",
|
||||||
onClick = onPullRebase,
|
onClick = onPullRebase,
|
||||||
),
|
),
|
||||||
|
DropDownContentData(
|
||||||
|
label = "Fetch all",
|
||||||
|
onClick = onFetchAll,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user