Skip to content

Commit

Permalink
Fixes #2842, fixes #2841 - Adopt new message sending queue API
Browse files Browse the repository at this point in the history
- automatically retry failed requests as soon as the network is availble again
- remove manual retry options
  • Loading branch information
stefanceriu committed Jun 6, 2024
1 parent 53fc5df commit 3fb107f
Show file tree
Hide file tree
Showing 25 changed files with 806 additions and 583 deletions.
2 changes: 1 addition & 1 deletion ElementX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7335,7 +7335,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 1.0.8;
version = 1.0.9;
};
};
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "464227df09ff5ab4d00e432df131f779ba2f7ced",
"version" : "1.0.8"
"revision" : "4f46a00c5a0ab3053f49f449b769237645f00b18",
"version" : "1.0.9"
}
},
{
Expand Down
4 changes: 3 additions & 1 deletion ElementX/Sources/Application/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
340 changes: 182 additions & 158 deletions ElementX/Sources/Mocks/Generated/GeneratedMocks.swift

Large diffs are not rendered by default.

Loading

0 comments on commit 3fb107f

Please sign in to comment.