Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
46c9461e58
commit
963371d619
@ -7,7 +7,7 @@
|
||||
<key>Andromida.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>2</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
@ -53,6 +53,9 @@ final class ReminderScheduler: NSObject, UNUserNotificationCenterDelegate {
|
||||
private(set) var authorizationStatus: UNAuthorizationStatus = .notDetermined
|
||||
private(set) var scheduledSlots: Set<ReminderSlot> = []
|
||||
|
||||
/// 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()
|
||||
}
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
BIN
Andromida/Assets.xcassets/AppIcon.appiconset/AppIcon-1024px.png
Normal file
BIN
Andromida/Assets.xcassets/AppIcon.appiconset/AppIcon-1024px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 292 KiB |
@ -1,6 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "AppIcon-1024px.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user