Skip to content

Commit

Permalink
Merge pull request #204 from moneymanagerex/view-11-journal
Browse files Browse the repository at this point in the history
fix account in JournalView
  • Loading branch information
georgeef authored Nov 3, 2024
2 parents e0ac292 + f037b4a commit 0eece8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MMEX/View/Journal/JournalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ struct JournalView: View {
}
}
.onAppear {
Task { await vm.loadTransactionList() }
accountId = (vm.infotableList.defaultAccountId.readyValue ?? nil) ?? DataId.void
Task {
await vm.loadTransactionList()
accountId = (vm.infotableList.defaultAccountId.readyValue ?? nil) ?? DataId.void
}
viewModel.loadTransactions(for: accountId)
viewModel.loadAccounts()
viewModel.loadCategories()
Expand Down
1 change: 1 addition & 0 deletions MMEX/ViewModel/List/ScheduledList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extension ViewModel {
load(&taskGroup, keyPath: \Self.scheduledList.used),
// auxiliary
load(&taskGroup, keyPath: \Self.infotableList.baseCurrencyId),
load(&taskGroup, keyPath: \Self.infotableList.defaultAccountId),
load(&taskGroup, keyPath: \Self.infotableList.categoryDelimiter),
load(&taskGroup, keyPath: \Self.currencyList.info),
load(&taskGroup, keyPath: \Self.accountList.data),
Expand Down
1 change: 1 addition & 0 deletions MMEX/ViewModel/List/TransactionList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extension ViewModel {
load(&taskGroup, keyPath: \Self.transactionList.used),
// auxiliary
load(&taskGroup, keyPath: \Self.infotableList.baseCurrencyId),
load(&taskGroup, keyPath: \Self.infotableList.defaultAccountId),
load(&taskGroup, keyPath: \Self.infotableList.categoryDelimiter),
load(&taskGroup, keyPath: \Self.currencyList.info),
load(&taskGroup, keyPath: \Self.accountList.data),
Expand Down

0 comments on commit 0eece8d

Please sign in to comment.