Skip to content
Snippets Groups Projects
Commit 919ad959 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UI/UX: avoid initial loading on main thread

Change-Id: I9179fbbb999cbe464e1738b637f427b6caf46e35
parent d1d0aa4d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment