Files
letro-ios/ElementX/Sources/Screens/Spaces/SpaceScreen/SpaceScreenModels.swift
Doug 780af95968 Add the JoinRoomScreen into the SpaceFlowCoordinator. (#4513)
* Add the JoinRoomScreen into the SpaceFlowCoordinator.

The screen needs further work to make the join work.

* Fix the tests completing the join flow with the right action.
2025-09-17 15:12:45 +01:00

34 lines
856 B
Swift

//
// Copyright 2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import Foundation
enum SpaceScreenViewModelAction {
case selectSpace(SpaceRoomListProxyProtocol)
case selectUnjoinedSpace(SpaceRoomProxyProtocol)
case selectRoom(roomID: String)
}
struct SpaceScreenViewState: BindableState {
let space: SpaceRoomProxyProtocol
var isPaginating = false
var rooms: [SpaceRoomProxyProtocol]
var selectedSpaceRoomID: String?
var joiningRoomIDs: Set<String> = []
var bindings = SpaceScreenViewStateBindings()
var spaceName: String { space.name ?? L10n.commonSpace }
}
struct SpaceScreenViewStateBindings { }
enum SpaceScreenViewAction {
case spaceAction(SpaceRoomCell.Action)
}