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