mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Enable e2ee support (#274)
* Enable sliding sync common extensions and session verification banner display; fix user session flow coordinator state machine * Fixed a couple of deprecation warnings * Add missing `m.room.encryption` required state * Switch to rust-sdk v1.0.15-alpha and add changelog
This commit is contained in:
@@ -3223,7 +3223,7 @@
|
|||||||
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = "1.0.14-alpha";
|
version = "1.0.15-alpha";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
|
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
|
||||||
|
|||||||
@@ -77,8 +77,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "787b00fbdd34cf296a760c27136749e60223ed01",
|
"revision" : "e3ae8941c864ba18e7e5c51d25a6ce2c5c7a65a0",
|
||||||
"version" : "1.0.14-alpha"
|
"version" : "1.0.15-alpha"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,14 +84,15 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
|
|
||||||
let slidingSyncView = try SlidingSyncViewBuilder()
|
let slidingSyncView = try SlidingSyncViewBuilder()
|
||||||
.timelineLimit(limit: 10)
|
.timelineLimit(limit: 10)
|
||||||
.requiredState(requiredState: [RequiredState(key: "m.room.avatar", value: "")])
|
.requiredState(requiredState: [RequiredState(key: "m.room.avatar", value: ""),
|
||||||
|
RequiredState(key: "m.room.encryption", value: "")])
|
||||||
.name(name: "HomeScreenView")
|
.name(name: "HomeScreenView")
|
||||||
.syncMode(mode: .fullSync)
|
.syncMode(mode: .fullSync)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
slidingSync = try slidingSyncBuilder
|
slidingSync = try slidingSyncBuilder
|
||||||
.addView(view: slidingSyncView)
|
.addView(view: slidingSyncView)
|
||||||
// .withCommonExtensions()
|
.withCommonExtensions()
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
roomSummaryProvider = RoomSummaryProvider(slidingSyncController: slidingSync,
|
roomSummaryProvider = RoomSummaryProvider(slidingSyncController: slidingSync,
|
||||||
@@ -254,6 +255,6 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
fileprivate func didReceiveSlidingSyncUpdate(summary: UpdateSummary) {
|
fileprivate func didReceiveSlidingSyncUpdate(summary: UpdateSummary) {
|
||||||
roomSummaryProvider.updateRoomsWithIdentifiers(summary.rooms)
|
roomSummaryProvider.updateRoomsWithIdentifiers(summary.rooms)
|
||||||
|
|
||||||
// callbacks.send(.receivedSyncUpdate)
|
callbacks.send(.receivedSyncUpdate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class UserSessionFlowCoordinator: Coordinator {
|
|||||||
case .presentRoom(let roomIdentifier):
|
case .presentRoom(let roomIdentifier):
|
||||||
self.stateMachine.processEvent(.showRoomScreen(roomId: roomIdentifier))
|
self.stateMachine.processEvent(.showRoomScreen(roomId: roomIdentifier))
|
||||||
case .presentSettings:
|
case .presentSettings:
|
||||||
self.presentSettingsScreen()
|
self.stateMachine.processEvent(.showSettingsScreen)
|
||||||
case .presentBugReport:
|
case .presentBugReport:
|
||||||
self.presentBugReportScreen()
|
self.presentBugReportScreen()
|
||||||
case .verifySession:
|
case .verifySession:
|
||||||
@@ -209,6 +209,8 @@ class UserSessionFlowCoordinator: Coordinator {
|
|||||||
|
|
||||||
navigationRouter.dismissModule()
|
navigationRouter.dismissModule()
|
||||||
remove(childCoordinator: coordinator)
|
remove(childCoordinator: coordinator)
|
||||||
|
|
||||||
|
stateMachine.processEvent(.dismissedSettingsScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Session verification
|
// MARK: Session verification
|
||||||
|
|||||||
@@ -89,6 +89,14 @@ class UserSessionFlowCoordinatorStateMachine {
|
|||||||
return .suspended
|
return .suspended
|
||||||
case (.becomeActive, .suspended):
|
case (.becomeActive, .suspended):
|
||||||
return self.stateBeforeSuspension
|
return self.stateBeforeSuspension
|
||||||
|
case (.showSettingsScreen, .homeScreen):
|
||||||
|
return .settingsScreen
|
||||||
|
case (.dismissedSettingsScreen, .settingsScreen):
|
||||||
|
return .homeScreen
|
||||||
|
case (.showSessionVerificationScreen, .homeScreen):
|
||||||
|
return .sessionVerificationScreen
|
||||||
|
case (.dismissedSessionVerificationScreen, .sessionVerificationScreen):
|
||||||
|
return .homeScreen
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ extension XCUIApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private var languageCode: String {
|
private var languageCode: String {
|
||||||
Locale.current.languageCode ?? ""
|
Locale.current.language.languageCode?.identifier ?? ""
|
||||||
}
|
}
|
||||||
|
|
||||||
private var regionCode: String {
|
private var regionCode: String {
|
||||||
Locale.current.regionCode ?? ""
|
Locale.current.language.region?.identifier ?? ""
|
||||||
}
|
}
|
||||||
|
|
||||||
private var osVersion: String {
|
private var osVersion: String {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Enable e2e encryption support
|
||||||
+1
-1
@@ -35,7 +35,7 @@ include:
|
|||||||
packages:
|
packages:
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/matrix-org/matrix-rust-components-swift
|
url: https://github.com/matrix-org/matrix-rust-components-swift
|
||||||
exactVersion: 1.0.14-alpha
|
exactVersion: 1.0.15-alpha
|
||||||
# path: ../matrix-rust-components-swift
|
# path: ../matrix-rust-components-swift
|
||||||
DesignKit:
|
DesignKit:
|
||||||
path: ./
|
path: ./
|
||||||
|
|||||||
Reference in New Issue
Block a user