From 6823925f6449991e86044e82e63c88ea43838e47 Mon Sep 17 00:00:00 2001 From: Gianni Carlo Date: Mon, 12 Jun 2023 08:43:50 -0500 Subject: [PATCH] Add environmentObject to previews --- BookPlayer/Library/ItemDetails Screen/ClearableTextField.swift | 1 + .../ItemDetails Screen/Views/ItemDetailsArtworkSectionView.swift | 1 + BookPlayer/Profile/CompleteAccount Screen/PricingRowView.swift | 1 + BookPlayer/Profile/Profile Screen/QueuedSyncTaskRowView.swift | 1 + BookPlayer/Profile/Profile Screen/Views/ProfileCardView.swift | 1 + .../Profile/Profile Screen/Views/ProfileListenedTimeView.swift | 1 + 6 files changed, 6 insertions(+) diff --git a/BookPlayer/Library/ItemDetails Screen/ClearableTextField.swift b/BookPlayer/Library/ItemDetails Screen/ClearableTextField.swift index a6037dcb..dbdd25b7 100644 --- a/BookPlayer/Library/ItemDetails Screen/ClearableTextField.swift +++ b/BookPlayer/Library/ItemDetails Screen/ClearableTextField.swift @@ -38,5 +38,6 @@ struct ClearableTextField: View { struct ClearableTextField_Previews: PreviewProvider { static var previews: some View { ClearableTextField("Title", text: .constant("")) + .environmentObject(ThemeViewModel()) } } diff --git a/BookPlayer/Library/ItemDetails Screen/Views/ItemDetailsArtworkSectionView.swift b/BookPlayer/Library/ItemDetails Screen/Views/ItemDetailsArtworkSectionView.swift index 009e5338..27f1cb0d 100644 --- a/BookPlayer/Library/ItemDetails Screen/Views/ItemDetailsArtworkSectionView.swift +++ b/BookPlayer/Library/ItemDetails Screen/Views/ItemDetailsArtworkSectionView.swift @@ -49,5 +49,6 @@ struct ItemDetailsArtworkSectionView_Previews: PreviewProvider { image: .constant(nil), actionHandler: {} ) + .environmentObject(ThemeViewModel()) } } diff --git a/BookPlayer/Profile/CompleteAccount Screen/PricingRowView.swift b/BookPlayer/Profile/CompleteAccount Screen/PricingRowView.swift index 28c4990e..cfb62f88 100644 --- a/BookPlayer/Profile/CompleteAccount Screen/PricingRowView.swift +++ b/BookPlayer/Profile/CompleteAccount Screen/PricingRowView.swift @@ -94,5 +94,6 @@ struct PricingRowView_Previews: PreviewProvider { isLoading: .constant(true) ) } + .environmentObject(ThemeViewModel()) } } diff --git a/BookPlayer/Profile/Profile Screen/QueuedSyncTaskRowView.swift b/BookPlayer/Profile/Profile Screen/QueuedSyncTaskRowView.swift index 5bf0eeff..76d2c051 100644 --- a/BookPlayer/Profile/Profile Screen/QueuedSyncTaskRowView.swift +++ b/BookPlayer/Profile/Profile Screen/QueuedSyncTaskRowView.swift @@ -37,5 +37,6 @@ struct QueuedSyncTaskRowView_Previews: PreviewProvider { imageName: .constant("bookmark"), title: .constant("Task") ) + .environmentObject(ThemeViewModel()) } } diff --git a/BookPlayer/Profile/Profile Screen/Views/ProfileCardView.swift b/BookPlayer/Profile/Profile Screen/Views/ProfileCardView.swift index ad5d15eb..ebcd4b50 100644 --- a/BookPlayer/Profile/Profile Screen/Views/ProfileCardView.swift +++ b/BookPlayer/Profile/Profile Screen/Views/ProfileCardView.swift @@ -73,5 +73,6 @@ struct ProfileCardView: View { struct ProfileCardView_Previews: PreviewProvider { static var previews: some View { ProfileCardView(account: .constant(Account())) + .environmentObject(ThemeViewModel()) } } diff --git a/BookPlayer/Profile/Profile Screen/Views/ProfileListenedTimeView.swift b/BookPlayer/Profile/Profile Screen/Views/ProfileListenedTimeView.swift index c682106e..c7935151 100644 --- a/BookPlayer/Profile/Profile Screen/Views/ProfileListenedTimeView.swift +++ b/BookPlayer/Profile/Profile Screen/Views/ProfileListenedTimeView.swift @@ -30,5 +30,6 @@ struct ProfileStatsView_Previews: PreviewProvider { ProfileListenedTimeView( formattedListeningTime: .constant("0m") ) + .environmentObject(ThemeViewModel()) } }