Check and clear old configs on app start and app foreground.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -14,8 +14,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
||||
self.appCoordinator = AppCoordinator(window: self.window!)
|
||||
self.appCoordinator.start()
|
||||
appCoordinator = AppCoordinator(window: self.window!)
|
||||
appCoordinator.start()
|
||||
|
||||
appCoordinator.checkAndCleanConfigs()
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -48,4 +50,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
appCoordinator.checkAndCleanConfigs()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user