Fix macOS builds

This commit is contained in:
William Brawner 2023-01-03 21:20:38 -07:00
parent 8c1239926b
commit f6ff3bc724
4 changed files with 10 additions and 1 deletions

View file

@ -32,9 +32,11 @@ struct BudgetDetailsView: View {
}
}
.listStyle(.insetGrouped)
#if !targetEnvironment(macCatalyst)
.refreshable {
await dataStore.loadOverview(showLoader: false)
}
#endif
.navigationBarItems(trailing: Button(action: {
dataStore.editBudget()
}, label: { Text("edit") }))

View file

@ -48,9 +48,12 @@ struct CategoryListView: View {
}
}
}
}.refreshable {
}
#if !targetEnvironment(macCatalyst)
.refreshable {
await dataStore.getCategories()
}
#endif
.navigationBarItems(trailing: Button(action: {
Task {
await dataStore.edit(TwigsCore.Category(budgetId: budgetId))

View file

@ -32,9 +32,11 @@ struct RecurringTransactionsListView: View {
}
}
}
#if !targetEnvironment(macCatalyst)
.refreshable {
await dataStore.getRecurringTransactions(showLoader: false)
}
#endif
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {

View file

@ -95,9 +95,11 @@ struct TransactionListView<Content>: View where Content: View {
TransactionList(transactions)
}
.searchable(text: $search)
#if !targetEnvironment(macCatalyst)
.refreshable {
await dataStore.getTransactions(showLoader: false)
}
#endif
.sheet(
isPresented: .constant(addingTransaction),
content: {