mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Toggle between add/done buttons when feeds are selected
This commit is contained in:
parent
6764f56cdd
commit
a8b5764dae
1 changed files with 17 additions and 9 deletions
|
|
@ -130,15 +130,23 @@ public struct LibraryScanFeedView: View {
|
|||
}
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .barTrailing) {
|
||||
Button(action: {
|
||||
dismiss()
|
||||
showInLibrarySnackbar("Adding feeds...")
|
||||
Task {
|
||||
await viewModel.addFeeds()
|
||||
}
|
||||
}, label: {
|
||||
Text("Done").bold()
|
||||
})
|
||||
if viewModel.selected.count > 0 {
|
||||
Button(action: {
|
||||
dismiss()
|
||||
showInLibrarySnackbar("Adding feeds...")
|
||||
Task {
|
||||
await viewModel.addFeeds()
|
||||
}
|
||||
}, label: {
|
||||
Text("Add").bold()
|
||||
})
|
||||
} else {
|
||||
Button(action: {
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text("Done").bold()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue