mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Fixes #1555, #1562 - Prevent the syncing indicator from showing up every time the app becomes active
This commit is contained in:
committed by
Stefan Ceriu
parent
76c5693a59
commit
a0a19fa75b
@@ -562,6 +562,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: identifier, type: .toast(progress: .indeterminate), title: L10n.commonSyncing, persistent: true))
|
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: identifier, type: .toast(progress: .indeterminate), title: L10n.commonSyncing, persistent: true))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard clientProxyObserver == nil else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Prevent the syncing indicator from showing over the offline one
|
// Prevent the syncing indicator from showing over the offline one
|
||||||
if ServiceLocator.shared.networkMonitor.reachabilityPublisher.value == .reachable {
|
if ServiceLocator.shared.networkMonitor.reachabilityPublisher.value == .reachable {
|
||||||
showLoadingIndicator()
|
showLoadingIndicator()
|
||||||
@@ -610,7 +614,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
|
|
||||||
@objc
|
@objc
|
||||||
private func applicationWillTerminate() {
|
private func applicationWillTerminate() {
|
||||||
userSession?.clientProxy.stopSync()
|
stopSync()
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc
|
@objc
|
||||||
@@ -624,7 +628,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
backgroundTask = backgroundTaskService.startBackgroundTask(withName: "SuspendApp: \(UUID().uuidString)") { [weak self] in
|
backgroundTask = backgroundTaskService.startBackgroundTask(withName: "SuspendApp: \(UUID().uuidString)") { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|
||||||
userSession?.clientProxy.stopSync()
|
stopSync()
|
||||||
|
|
||||||
backgroundTask?.stop()
|
backgroundTask?.stop()
|
||||||
backgroundTask = nil
|
backgroundTask = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user