Fixes #2842, fixes #2841 - Adopt new message sending queue API

- automatically retry failed requests as soon as the network is availble again
- remove manual retry options
This commit is contained in:
Stefan Ceriu
2024-05-28 10:17:13 +03:00
committed by Stefan Ceriu
parent 4d6f5d91a8
commit 425f4bd45f
28 changed files with 827 additions and 606 deletions

View File

@@ -666,10 +666,12 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
ServiceLocator.shared.networkMonitor
.reachabilityPublisher
.removeDuplicates()
.sink { reachability in
.sink { [weak self] reachability in
MXLog.info("Reachability changed to \(reachability)")
if reachability == .reachable {
self?.userSession?.clientProxy.setSendingQueueEnabled(true)
ServiceLocator.shared.userIndicatorController.retractIndicatorWithId(reachabilityNotificationIdentifier)
} else {
ServiceLocator.shared.userIndicatorController.submitIndicator(.init(id: reachabilityNotificationIdentifier,