Fixed bug that NavigationLink navigated to AccountTransactionsDialog twice

This commit is contained in:
dankito 2020-09-07 03:42:38 +02:00
parent 9dc45cb53f
commit a7d56603e5
1 changed files with 9 additions and 2 deletions

View File

@ -6,17 +6,24 @@ struct AllBanksListItem: View {
let banks: [Customer]
@State private var navigateToAccountTransactionsDialog = false
var body: some View {
Section {
NavigationLink(destination: LazyView(AccountTransactionsDialog(allBanks: self.banks))) {
NavigationLink(destination: EmptyView(), isActive: .constant(false)) { // NavigationLink navigated to AccountTransactionsDialog twice. So i disabled NavigationLink and implemented manual navigation
HStack {
IconedTitleView(accountTitle: "All accounts".localize(), iconUrl: nil, defaultIconName: Styles.AccountFallbackIcon, titleFont: .headline)
Spacer()
AmountLabel(amount: banks.sumBalances())
}.frame(height: 35)
}
.frame(height: 35)
.background(Color.systemBackground) // make background tapable
}
.onTapGesture {
SceneDelegate.navigateToView(AccountTransactionsDialog(allBanks: self.banks))
}
}
}