diff --git a/Andromida.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist b/Andromida.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist index 23eac62..9e6a2b8 100644 --- a/Andromida.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Andromida.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ Andromida.xcscheme_^#shared#^_ orderHint - 2 + 1 diff --git a/Andromida/App/Services/ReminderScheduler.swift b/Andromida/App/Services/ReminderScheduler.swift index ae85435..3294c27 100644 --- a/Andromida/App/Services/ReminderScheduler.swift +++ b/Andromida/App/Services/ReminderScheduler.swift @@ -53,6 +53,9 @@ final class ReminderScheduler: NSObject, UNUserNotificationCenterDelegate { private(set) var authorizationStatus: UNAuthorizationStatus = .notDetermined private(set) var scheduledSlots: Set = [] + /// Set to true when user taps a notification - observe in RootView to navigate + var shouldNavigateToToday = false + /// Whether reminders are enabled by the user var remindersEnabled: Bool { get { UserDefaults.standard.bool(forKey: "remindersEnabled") } @@ -95,6 +98,7 @@ final class ReminderScheduler: NSObject, UNUserNotificationCenterDelegate { print("🔔 Notification received/tapped: \(response.notification.request.identifier)") // Clear badge when user interacts with notification clearBadge() + shouldNavigateToToday = true completionHandler() } diff --git a/Andromida/App/Views/RootView.swift b/Andromida/App/Views/RootView.swift index 22efdb2..6b8692b 100644 --- a/Andromida/App/Views/RootView.swift +++ b/Andromida/App/Views/RootView.swift @@ -79,6 +79,12 @@ struct RootView: View { .onChange(of: selectedTab) { _, _ in refreshCurrentTab() } + .onChange(of: store.reminderScheduler.shouldNavigateToToday) { _, shouldNavigate in + if shouldNavigate { + selectedTab = .today + store.reminderScheduler.shouldNavigateToToday = false + } + } } private func refreshCurrentTab() { diff --git a/Andromida/Assets.xcassets/AppIcon.appiconset/AppIcon-1024px.png b/Andromida/Assets.xcassets/AppIcon.appiconset/AppIcon-1024px.png new file mode 100644 index 0000000..7d2f637 Binary files /dev/null and b/Andromida/Assets.xcassets/AppIcon.appiconset/AppIcon-1024px.png differ diff --git a/Andromida/Assets.xcassets/AppIcon.appiconset/Contents.json b/Andromida/Assets.xcassets/AppIcon.appiconset/Contents.json index 2305880..96cceb0 100644 --- a/Andromida/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Andromida/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "AppIcon-1024px.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024"