Fixed that ContextMenu items didn't work anymore on iOS 14
This commit is contained in:
parent
73faa6e7e5
commit
bc94394937
|
@ -53,7 +53,7 @@ struct AccountTransactionListItem: View {
|
||||||
}
|
}
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
if transaction.canCreateMoneyTransferFrom {
|
if transaction.canCreateMoneyTransferFrom {
|
||||||
NavigationLink(destination: LazyView(TransferMoneyDialog(preselectedValues: TransferMoneyData.Companion().fromAccountTransactionWithoutAmountAndReference(transaction: self.transaction)))) {
|
Button(action: { self.navigateToTransferMoneyDialog(TransferMoneyData.Companion().fromAccountTransactionWithoutAmountAndReference(transaction: self.transaction)) }) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Transfer money to \(transaction.otherPartyName ?? "")")
|
Text("Transfer money to \(transaction.otherPartyName ?? "")")
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ struct AccountTransactionListItem: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink(destination: LazyView(TransferMoneyDialog(preselectedValues: TransferMoneyData.Companion().fromAccountTransaction(transaction: self.transaction)))) {
|
Button(action: { self.navigateToTransferMoneyDialog(TransferMoneyData.Companion().fromAccountTransaction(transaction: self.transaction)) }) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("New transfer with same data")
|
Text("New transfer with same data")
|
||||||
|
|
||||||
|
@ -70,6 +70,9 @@ struct AccountTransactionListItem: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onTapGesture {
|
||||||
|
SceneDelegate.navigateToView(AccountTransactionDetailsDialog(transaction))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,6 +88,10 @@ struct AccountTransactionListItem: View {
|
||||||
return transaction.bookingText ?? ""
|
return transaction.bookingText ?? ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func navigateToTransferMoneyDialog(_ preselectedValues: TransferMoneyData) {
|
||||||
|
SceneDelegate.navigateToView(TransferMoneyDialog(preselectedValues: preselectedValues))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AccountTransactionListItem_Previews: PreviewProvider {
|
struct AccountTransactionListItem_Previews: PreviewProvider {
|
||||||
|
|
Loading…
Reference in New Issue