diff --git a/Ring/Ring/AppDelegate.swift b/Ring/Ring/AppDelegate.swift index dd0b86273e27e26c524a24a805bd2a831e1ee4f1..eec89266a59fb59513d383aa76517039bd5e0f72 100644 --- a/Ring/Ring/AppDelegate.swift +++ b/Ring/Ring/AppDelegate.swift @@ -162,6 +162,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD // Observe connectivity changes and reconnect DHT self.networkService.connectionStateObservable + .skip(1) .subscribe(onNext: { _ in self.daemonService.connectivityChanged() }) @@ -308,7 +309,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD UserDefaults.standard.set(true, forKey: hardareAccelerationKey) return } - self.reloadDataFor(account: currentAccount) + DispatchQueue.global(qos: .background).async {[weak self] in + guard let self = self else { return } + self.reloadDataFor(account: currentAccount) + } }, onError: { _ in self.appCoordinator.showInitialLoading() let time = DispatchTime.now() + 1