Re-did that NavigationLink is shown for whole cell as otherwise navigation crashes the app (why, iOS, why?)

This commit is contained in:
dankito 2020-07-19 21:36:53 +02:00
parent 7ec1c3f94b
commit e95dfee564
1 changed files with 10 additions and 10 deletions

View File

@ -8,25 +8,25 @@ struct BankListItem : View {
var body: some View { var body: some View {
VStack { NavigationLink(destination: AccountTransactionsDialog(title: bank.displayName, transactions: bank.accounts.flatMap { $0.bookedTransactions })) {
NavigationLink(destination: AccountTransactionsDialog(title: bank.displayName, transactions: bank.accounts.flatMap { $0.bookedTransactions })) { VStack {
HStack { HStack {
Text(bank.displayName) Text(bank.displayName)
.font(.headline) .font(.headline)
Spacer() Spacer()
}.frame(height: 35) }.frame(height: 35)
}
VStack {
VStack { ForEach(0 ..< bank.accounts.count) { accountIndex in
ForEach(0 ..< bank.accounts.count) { accountIndex in BankAccountListItem(account: self.bank.accounts[accountIndex])
BankAccountListItem(account: self.bank.accounts[accountIndex]) }
} }
.padding(.leading, 18)
} }
.padding(.leading, 18)
} }
} }
} }