Move VPN manager logic into its own controller

This commit is contained in:
relikd
2020-06-28 16:31:11 +02:00
parent 3ed25c92cd
commit 710c617862
7 changed files with 145 additions and 164 deletions

View File

@@ -1,5 +1,7 @@
import UIKit
let sync = SyncUpdate(periodic: 7)
class SyncUpdate {
private var lastSync: TimeInterval = 0
private var timer: Timer!
@@ -18,7 +20,7 @@ class SyncUpdate {
private(set) var tsLatest: Timestamp? // as set per user, not actual latest
init(periodic interval: TimeInterval) {
fileprivate init(periodic interval: TimeInterval) {
(filterType, tsEarliest, tsLatest) = Prefs.DateFilter.restrictions()
reloadRangeFromDB()