mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Add support for joining rooms from a space. (#4501)
* Add support for joining rooms from a space.
Doesn't yet handle the Join button 🤔
* Handle the join button for both rooms and spaces.
Also refactor more instances of spaceRoom to spaceRoomProxy.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
import Combine
|
||||
import MatrixRustSDK
|
||||
import SwiftUI
|
||||
|
||||
typealias JoinRoomScreenViewModelType = StateStoreViewModel<JoinRoomScreenViewState, JoinRoomScreenViewAction>
|
||||
@@ -211,8 +212,8 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
||||
state.mode = .inviteRequired
|
||||
case .knock, .knockRestricted:
|
||||
state.mode = appSettings.knockingEnabled ? .knockable : .joinable
|
||||
case .restricted:
|
||||
state.mode = .restricted
|
||||
case .restricted(let rules):
|
||||
state.mode = clientProxy.canJoinRoom(with: rules) ? .joinable : .restricted
|
||||
default:
|
||||
state.mode = .joinable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user