Jonas Björkert 1 год назад
Родитель
Сommit
676f3fc42a
2 измененных файлов с 2 добавлено и 3 удалено
  1. 0 3
      LoopFollow/Task/BGTask.swift
  2. 2 0
      LoopFollow/Task/TaskScheduler.swift

+ 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 {