Procházet zdrojové kódy

Background alert adjustment

Jonas Björkert před 1 rokem
rodič
revize
676f3fc42a

+ 0 - 3
LoopFollow/Task/BGTask.swift

@@ -18,9 +18,6 @@ extension MainViewController {
     }
 
     func bgTaskAction() {
-        //This pushes forward the warning notification about the app is not active
-        BackgroundAlertManager.shared.scheduleBackgroundAlert()
-
         // If anything goes wrong, try again in 60 seconds.
         TaskScheduler.shared.rescheduleTask(
             id: .fetchBG,

+ 2 - 0
LoopFollow/Task/TaskScheduler.swift

@@ -96,6 +96,8 @@ class TaskScheduler {
     }
 
     private func fireOverdueTasks() {
+        BackgroundAlertManager.shared.scheduleBackgroundAlert()
+
         let now = Date()
         for (id, task) in tasks {
             if task.nextRun <= now {