From 4461d0d931250b4e6e11c73919d97e8adc7e7336 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 17 Jul 2020 23:13:08 +0200 Subject: [PATCH] Implemented sorting transactions descending by value date --- .../BankingiOSApp/ui/views/AccountTransactionsDialog.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionsDialog.swift index 22902475..a14a7303 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountTransactionsDialog.swift @@ -13,7 +13,7 @@ struct AccountTransactionsDialog: View { var body: some View { - List(transactions, id: \.id) { transaction in + List(transactions.sorted(by: { $0.valueDate.date > $1.valueDate.date } ), id: \.id) { transaction in HStack { VStack(alignment: .leading) { Text(transaction.bookingText ?? "")