mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
pr suggestions
This commit is contained in:
@@ -478,6 +478,7 @@ class ChatsTabFlowCoordinator: FlowCoordinatorProtocol {
|
||||
guard case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(roomID) else {
|
||||
return
|
||||
}
|
||||
// The screen requires listening to the membership state changes
|
||||
await roomProxy.subscribeForUpdates()
|
||||
|
||||
let parameters = RoomChangeRolesScreenCoordinatorParameters(mode: .owner,
|
||||
|
||||
@@ -55,6 +55,8 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case space
|
||||
/// The user is adding rooms to the space.
|
||||
case addingRooms
|
||||
/// The user is transferring their ownership of the space.
|
||||
case transferOwnership
|
||||
/// A child (space) flow is in progress.
|
||||
case presentingChild(childSpaceID: String, previousState: State)
|
||||
/// A room flow is in progress
|
||||
@@ -69,11 +71,9 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case createChildRoomFlow
|
||||
|
||||
case leftSpace
|
||||
|
||||
case transferOwnership
|
||||
}
|
||||
|
||||
enum Event: EventType, Equatable, Hashable {
|
||||
enum Event: EventType {
|
||||
/// The flow is being started.
|
||||
case start
|
||||
/// The flow is being started for an unjoined space.
|
||||
@@ -89,6 +89,11 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
/// The user finished adding rooms to this space.
|
||||
case dismissedAddRooms
|
||||
|
||||
/// Allow the user to transfer their ownership of the space.
|
||||
case presentTransferOwnership
|
||||
/// The user finished transferring their ownership of the space.
|
||||
case dismissedTransferOwnership
|
||||
|
||||
/// Request the presentation of a child space flow.
|
||||
///
|
||||
/// The space's `SpaceRoomListProxyProtocol` must be provided in the `userInfo`.
|
||||
@@ -110,9 +115,6 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
|
||||
case startCreateChildRoomFlow
|
||||
case stopCreateChildRoomFlow
|
||||
|
||||
case presentTransferOwnership
|
||||
case dismissedTransferOwnership
|
||||
}
|
||||
|
||||
private let stateMachine: StateMachine<State, Event>
|
||||
@@ -166,6 +168,9 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case .addingRooms:
|
||||
navigationStackCoordinator.setSheetCoordinator(nil)
|
||||
clearRoute(animated: animated) // Re-run with the state machine back in the .space state.
|
||||
case .transferOwnership:
|
||||
navigationStackCoordinator.setSheetCoordinator(nil)
|
||||
clearRoute(animated: animated) // Re-run with the state machine back in the .space state.
|
||||
case .presentingChild:
|
||||
childSpaceFlowCoordinator?.clearRoute(animated: animated)
|
||||
clearRoute(animated: animated) // Re-run with the state machine back in the .space state.
|
||||
@@ -184,9 +189,6 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case .createChildRoomFlow:
|
||||
navigationStackCoordinator.setSheetCoordinator(nil)
|
||||
clearRoute(animated: animated) // Re-run with the state machine back in the .space state.
|
||||
case .transferOwnership:
|
||||
navigationStackCoordinator.setSheetCoordinator(nil)
|
||||
clearRoute(animated: animated) // Re-run with the state machine back in the .space state.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,16 +27,16 @@ final class SpaceSettingsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case securityAndPrivacy
|
||||
/// The edit address screen
|
||||
case editAddress
|
||||
/// The manage authorized spaces screen
|
||||
case manageAuthorizedSpacesScreen
|
||||
/// The screen that allows a user to transfer their ownership of the space.
|
||||
case transferOwnership
|
||||
|
||||
/// Other flows
|
||||
/// The roles and permissions screen
|
||||
case rolesAndPermissionsFlow
|
||||
/// The members flow screen
|
||||
case membersFlow
|
||||
|
||||
case manageAuthorizedSpacesScreen
|
||||
|
||||
case transferOwnership
|
||||
}
|
||||
|
||||
enum Event: EventType {
|
||||
@@ -53,18 +53,18 @@ final class SpaceSettingsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case presentEditAddress
|
||||
case dismissedEditAddress
|
||||
|
||||
case presentManageAuthorizedSpacesScreen
|
||||
case dismissedManageAuthorizedSpacesScreen
|
||||
|
||||
case presentTransferOwnership
|
||||
case dismissedTransferOwnership
|
||||
|
||||
// Other flows
|
||||
case startMembersListFlow
|
||||
case stopMembersListFlow
|
||||
|
||||
case startRolesAndPermissionsFlow
|
||||
case stopRolesAndPermissionsFlow
|
||||
|
||||
case presentManageAuthorizedSpacesScreen
|
||||
case dismissedManageAuthorizedSpacesScreen
|
||||
|
||||
case presentTransferOwnership
|
||||
case dismissedTransferOwnership
|
||||
}
|
||||
|
||||
private let roomProxy: JoinedRoomProxyProtocol
|
||||
|
||||
Reference in New Issue
Block a user