Fix: tapping task notification now marks it complete

Tap body → marks complete + navigates to tasks.
Swipe action 'Mark Complete' → marks complete without opening app.
TaskViewModel.reload() called on foreground to sync UserDefaults changes
made while app was backgrounded.

Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
This commit is contained in:
Robin Kutesa
2026-06-01 03:52:10 +03:00
parent 12e3cfdd13
commit 0c48ca888b
3 changed files with 66 additions and 11 deletions

View File

@@ -88,6 +88,7 @@ struct ContentView: View {
}
.onChange(of: scenePhase) { phase in
if phase == .active {
taskVM.reload()
NotificationManager.shared.reschedule(workoutVM: workoutVM, taskVM: taskVM)
}
}