Added 'Add account' to 'New ...' action sheet

This commit is contained in:
dankito 2020-08-06 15:44:41 +02:00
parent d444baeda8
commit 64e49c661a
1 changed files with 7 additions and 2 deletions

View File

@ -68,7 +68,11 @@ struct ContentView: View {
/* Second tab: 'New' action sheet button */
VStack {
NavigationLink(destination: TransferMoneyDialog(), tag: 1, selection: self.$selectedNewOption.didSet(self.selectedNewOptionChanged)) {
NavigationLink(destination: LazyView(AddAccountDialog()), tag: 1, selection: self.$selectedNewOption.didSet(self.selectedNewOptionChanged)) {
EmptyView()
}
NavigationLink(destination: LazyView(TransferMoneyDialog()), tag: 2, selection: self.$selectedNewOption.didSet(self.selectedNewOptionChanged)) {
EmptyView()
}
@ -76,7 +80,8 @@ struct ContentView: View {
ActionSheet(
title: Text("New ..."),
buttons: [
.default(Text("Show transfer money dialog")) { self.selectedNewOption = 1 },
.default(Text("Show transfer money dialog")) { self.selectedNewOption = 2 },
.default(Text("Add account")) { self.selectedNewOption = 1 },
.cancel { self.showPreviousSelectedTab() }
]
)