filtering days in customize will filter views

This commit is contained in:
Trey t
2022-03-31 14:45:08 -05:00
parent 9e4cfd2775
commit bdd0b0ce59
14 changed files with 102 additions and 66 deletions

View File

@@ -14,6 +14,8 @@ struct FeelsApp: App {
@Environment(\.scenePhase) private var scenePhase
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@StateObject var daysFilter = DaysFilterClass()
let persistenceController = PersistenceController.shared
init() {
@@ -28,6 +30,7 @@ struct FeelsApp: App {
WindowGroup {
MainTabView()
.environment(\.managedObjectContext, persistenceController.viewContext)
.environmentObject(daysFilter)
}.onChange(of: scenePhase) { phase in
if phase == .background {
// BGTask.scheduleBackgroundProcessing()