Add task persistence and per-task reminder notifications
Tasks now survive app restarts via UserDefaults JSON. Each task with a due time fires a notification at that exact time; date-only tasks fire at 9am on the due date. Completing or deleting a task cancels its pending notification. ContentView now reschedules on any task change.
This commit is contained in:
@@ -1096,7 +1096,7 @@ struct AddTaskSheet: View {
|
||||
|
||||
private func submit() {
|
||||
guard canAdd else { return }
|
||||
taskVM.addTask(title: cleanTitle, dueDate: parsed.date,
|
||||
taskVM.addTask(title: cleanTitle, dueDate: parsed.date, hasTime: parsed.hasTime,
|
||||
quadrant: selectedQuadrant, category: selectedCategory)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user