Skip to content

Commit

Permalink
allow task to be picked up by notifications again if it is delayed
Browse files Browse the repository at this point in the history
  • Loading branch information
aapis committed Oct 15, 2024
1 parent 4e529d6 commit 29569ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions KWCore/Sources/Query/CoreDataTasks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public class CoreDataTasks {
public func complete(_ task: LogTask) -> Void {
task.completedDate = Date()
task.lastUpdate = Date()

task.hasScheduledNotification = false

do {
try moc!.save()

Expand Down Expand Up @@ -278,7 +279,8 @@ public class CoreDataTasks {
public func cancel(_ task: LogTask) -> Void {
task.cancelledDate = Date()
task.lastUpdate = Date()

task.hasScheduledNotification = false

do {
try moc!.save()

Expand All @@ -299,6 +301,7 @@ public class CoreDataTasks {
/// - Returns: Void
public func due(on date: Date, task: LogTask) -> Void {
task.due = date
task.hasScheduledNotification = true

do {
try moc!.save()
Expand Down

0 comments on commit 29569ab

Please sign in to comment.