From 20b56fb05a6e78655d4214b3d44f1edd795bdf4d Mon Sep 17 00:00:00 2001 From: William Brawner Date: Tue, 14 Dec 2021 06:15:32 -0700 Subject: [PATCH] Fix compilation issue and crash on mobile --- Twigs.xcodeproj/project.pbxproj | 4 ++-- .../RecurringTransactionsListView.swift | 4 ++++ Twigs/TabbedBudgetView.swift | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Twigs.xcodeproj/project.pbxproj b/Twigs.xcodeproj/project.pbxproj index 33f1dc5..7dcc551 100644 --- a/Twigs.xcodeproj/project.pbxproj +++ b/Twigs.xcodeproj/project.pbxproj @@ -681,7 +681,7 @@ CODE_SIGN_ENTITLEMENTS = Twigs/Twigs.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; DEVELOPMENT_ASSET_PATHS = "\"Twigs/Preview Content\""; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; @@ -709,7 +709,7 @@ CODE_SIGN_ENTITLEMENTS = Twigs/Twigs.entitlements; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; DEVELOPMENT_ASSET_PATHS = "\"Twigs/Preview Content\""; DEVELOPMENT_TEAM = 9Z6DE6KNJ9; diff --git a/Twigs/Recurring Transactions/RecurringTransactionsListView.swift b/Twigs/Recurring Transactions/RecurringTransactionsListView.swift index f9f1930..aaef2bc 100644 --- a/Twigs/Recurring Transactions/RecurringTransactionsListView.swift +++ b/Twigs/Recurring Transactions/RecurringTransactionsListView.swift @@ -25,11 +25,13 @@ struct RecurringTransactionsListView: View { } } +#if DEBUG struct RecurringTransactionView_Previews: PreviewProvider { static var previews: some View { RecurringTransactionsListView(dataStore: RecurringTransactionDataStore(MockRecurringTransactionRepository(), budgetId: "")) } } +#endif struct RecurringTransactionsListItemView: View { let transaction: RecurringTransaction @@ -68,8 +70,10 @@ struct RecurringTransactionsListItemView: View { } } +#if DEBUG struct RecurringTransactionsListItemView_Previews: PreviewProvider { static var previews: some View { RecurringTransactionsListItemView(MockRecurringTransactionRepository.transaction) } } +#endif diff --git a/Twigs/TabbedBudgetView.swift b/Twigs/TabbedBudgetView.swift index 862c9d7..eaf09c2 100644 --- a/Twigs/TabbedBudgetView.swift +++ b/Twigs/TabbedBudgetView.swift @@ -102,7 +102,7 @@ struct TabbedBudgetView: View { }).sheet(isPresented: $budgetDataStore.showBudgetSelection, content: { List { - BudgetListsView() + BudgetListsView().environmentObject(budgetDataStore) } }) .interactiveDismissDisabled(true)