Forráskód Böngészése

Remove persistentNotification

Jonas Björkert 1 éve
szülő
commit
d51d91c243

+ 0 - 2
LoopFollow/Storage/UserDefaults.swift

@@ -102,8 +102,6 @@ class UserDefaultsRepository {
     static let backgroundRefresh = UserDefaultsValue<Bool>(key: "backgroundRefresh", default: true)
 
     static let dimScreenWhenIdle = UserDefaultsValue<Int>(key: "dimScreenWhenIdle", default: 0)
-    static let persistentNotification = UserDefaultsValue<Bool>(key: "persistentNotification", default: false)
-    static let persistentNotificationLastBGTime = UserDefaultsValue<TimeInterval>(key: "persistentNotificationLastBGTime", default: 0)
 
     // Advanced Settings
     // static let onlyDownloadBG = UserDefaultsValue<Bool>(key: "onlyDownloadBG", default: false)

+ 0 - 10
LoopFollow/ViewControllers/MainViewController.swift

@@ -787,16 +787,6 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         }
     }
 
-    func persistentNotification(bgTime: TimeInterval) {
-        if UserDefaultsRepository.persistentNotification.value && bgTime > UserDefaultsRepository.persistentNotificationLastBGTime.value && bgData.count > 0 {
-            /* TODO:
-             guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-             snoozer.sendNotification(self, bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: Observable.shared.directionText.value, deltaVal: latestDeltaString, minAgoVal: Observable.shared.minAgoText.value, alertLabelVal: "Latest BG") */
-        }
-    }
-
-    // General Notifications
-
     func sendGeneralNotification(_: Any, title: String, subtitle: String, body: String, timer: TimeInterval) {
         let content = UNMutableNotificationContent()
         content.title = title