Skip to content

Commit

Permalink
remove notifications for a task when we cancel or complete ti
Browse files Browse the repository at this point in the history
  • Loading branch information
aapis committed Oct 15, 2024
1 parent 29569ab commit 3f571f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions KWCore/Sources/Query/CoreDataTasks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ public class CoreDataTasks {
task.completedDate = Date()
task.lastUpdate = Date()
task.hasScheduledNotification = false
NotificationHelper.clean(identifier: task.id?.uuidString ?? "no-id")

do {
try moc!.save()
Expand Down Expand Up @@ -280,6 +281,7 @@ public class CoreDataTasks {
task.cancelledDate = Date()
task.lastUpdate = Date()
task.hasScheduledNotification = false
NotificationHelper.clean(identifier: task.id?.uuidString ?? "no-id")

do {
try moc!.save()
Expand Down

0 comments on commit 3f571f1

Please sign in to comment.