mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
#1257 - Prevent the syncing indicator from showing over the offline one
This commit is contained in:
committed by
Stefan Ceriu
parent
59865a4b16
commit
56544d6604
@@ -475,10 +475,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
networkMonitorObserver = ServiceLocator.shared.networkMonitor
|
||||
.reachabilityPublisher
|
||||
.removeDuplicates()
|
||||
.sink { reachable in
|
||||
MXLog.info("Reachability changed to \(reachable)")
|
||||
.sink { reachability in
|
||||
MXLog.info("Reachability changed to \(reachability)")
|
||||
|
||||
if reachable {
|
||||
if reachability == .reachable {
|
||||
ServiceLocator.shared.userIndicatorController.retractIndicatorWithId(reachabilityNotificationIdentifier)
|
||||
} else {
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: reachabilityNotificationIdentifier,
|
||||
@@ -566,7 +566,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: identifier, type: .toast(progress: .indeterminate), title: L10n.commonSyncing, persistent: true))
|
||||
}
|
||||
|
||||
showLoadingIndicator()
|
||||
// Prevent the syncing indicator from showing over the offline one
|
||||
if ServiceLocator.shared.networkMonitor.reachabilityPublisher.value == .reachable {
|
||||
showLoadingIndicator()
|
||||
}
|
||||
|
||||
clientProxyObserver = userSession.clientProxy
|
||||
.callbacks
|
||||
|
||||
Reference in New Issue
Block a user