Skip to content

Commit

Permalink
Security and privacy part 2 (#3637)
Browse files Browse the repository at this point in the history
* handling the history visibility flag

* better logic to handle visibility

* better handling of the visibility options state

* added some copies, and the public room directory

visibility state

* completed the UI

added also the preview tests

* improved the handling of the directory visibility

* added the space users case

and improved handling of the access -> vsibility reaction. Also added a simple error handling for the public directory toggle

* added the edit room address view

but is missing its full implementation

* implement the UI for the edit room address screen

* implemented error checking

when editing the address

* updated preview tests and improved code

* typo fix

* Fix various issues after rebasing.

* Fix build errors and broken snapshot tests

* Adopt latest room privacy and canonical alias setting APIs

* Add support for creating and editing the room's alias.

* Add support for saving room privacy setting changes.

* Fix room alias screen snapshot tests following recent changes.

---------

Co-authored-by: Stefan Ceriu <[email protected]>
  • Loading branch information
Velin92 and stefanceriu authored Jan 15, 2025
1 parent cfb01d6 commit e3ad925
Show file tree
Hide file tree
Showing 61 changed files with 2,216 additions and 136 deletions.
46 changes: 45 additions & 1 deletion ElementX.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "cc9cd80aa6954a7945d82c29182f81c5219f635e",
"version" : "25.1.10-2"
"revision" : "0e9afdf46c3128a0dc13c2d2fcee32ad3298a1a6",
"version" : "25.1.13"
}
},
{
Expand Down
26 changes: 23 additions & 3 deletions ElementX/Sources/FlowCoordinators/RoomFlowCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1468,14 +1468,16 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
}

private func presentSecurityAndPrivacyScreen() {
let coordinator = SecurityAndPrivacyScreenCoordinator(parameters: .init(roomProxy: roomProxy))
let coordinator = SecurityAndPrivacyScreenCoordinator(parameters: .init(roomProxy: roomProxy,
clientProxy: userSession.clientProxy,
userIndicatorController: userIndicatorController))

coordinator.actionsPublisher.sink { [weak self] action in
guard let self else { return }

switch action {
case .done:
break
case .displayEditAddressScreen:
presentEditAddressScreen()
}
}
.store(in: &cancellables)
Expand All @@ -1485,6 +1487,24 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
}
}

private func presentEditAddressScreen() {
let stackCoordinator = NavigationStackCoordinator()
let coordinator = EditRoomAddressScreenCoordinator(parameters: .init(roomProxy: roomProxy,
clientProxy: userSession.clientProxy,
userIndicatorController: userIndicatorController))

coordinator.actionsPublisher.sink { [weak self] action in
switch action {
case .dismiss:
self?.navigationStackCoordinator.setSheetCoordinator(nil)
}
}
.store(in: &cancellables)

stackCoordinator.setRootCoordinator(coordinator)
navigationStackCoordinator.setSheetCoordinator(stackCoordinator)
}

// MARK: - Other flows

private func startChildFlow(for roomID: String, via: [String], entryPoint: RoomFlowCoordinatorEntryPoint) async {
Expand Down
Loading

0 comments on commit e3ad925

Please sign in to comment.