mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 00:49:44 +00:00
Avoid races between enabling the send queue and receiving back a status update, stop dropping duplicates both here and on reachability status printing.
This commit is contained in:
committed by
Stefan Ceriu
parent
bdaa50c28c
commit
341b6df70a
@@ -665,7 +665,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
let reachabilityNotificationIdentifier = "io.element.elementx.reachability.notification"
|
let reachabilityNotificationIdentifier = "io.element.elementx.reachability.notification"
|
||||||
ServiceLocator.shared.networkMonitor
|
ServiceLocator.shared.networkMonitor
|
||||||
.reachabilityPublisher
|
.reachabilityPublisher
|
||||||
.removeDuplicates()
|
|
||||||
.sink { reachability in
|
.sink { reachability in
|
||||||
MXLog.info("Reachability changed to \(reachability)")
|
MXLog.info("Reachability changed to \(reachability)")
|
||||||
|
|
||||||
|
|||||||
@@ -173,11 +173,10 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
})
|
})
|
||||||
|
|
||||||
sendQueueStatusSubject
|
sendQueueStatusSubject
|
||||||
.removeDuplicates()
|
|
||||||
.combineLatest(networkMonitor.reachabilityPublisher)
|
.combineLatest(networkMonitor.reachabilityPublisher)
|
||||||
.debounce(for: 1.0, scheduler: DispatchQueue.main)
|
.debounce(for: 1.0, scheduler: DispatchQueue.main)
|
||||||
.sink { enabled, reachability in
|
.sink { enabled, reachability in
|
||||||
MXLog.info("Send queue status changed to enabled: \(enabled)")
|
MXLog.info("Send queue status changed to enabled: \(enabled), reachability: \(reachability)")
|
||||||
|
|
||||||
if enabled == false, reachability == .reachable {
|
if enabled == false, reachability == .reachable {
|
||||||
MXLog.info("Enabling all send queues")
|
MXLog.info("Enabling all send queues")
|
||||||
|
|||||||
Reference in New Issue
Block a user