work on text input for room creation

This commit is contained in:
Flavio Alescio
2023-04-20 17:28:36 +02:00
committed by Flescio
parent 06147cd99c
commit a4334ebb0d
3 changed files with 93 additions and 13 deletions
@@ -22,9 +22,21 @@ enum CreateRoomViewModelAction {
struct CreateRoomViewState: BindableState {
var selectedUsers: [UserProfile]
var bindings = CreateRoomViewStateBindings()
var canCreateRoom: Bool {
!bindings.roomName.isEmpty
}
}
struct CreateRoomViewStateBindings {
var roomName = ""
var roomTopic = ""
}
enum CreateRoomViewAction {
case createRoom
case selectPrivateRoom
case selectPublicRoom
case deselectUser(UserProfile)
}