Flescio/create room action (#925)

* fix invites users screen

* add create room action

* add a task runner with timeout, add fetch room summary after creation

* rename Runner, add Unit Test, separate UserProfile form client proxy

* change to all room summary publisher
This commit is contained in:
Flescio
2023-05-22 17:27:39 +02:00
committed by GitHub
parent 16728ca438
commit beb61d109f
25 changed files with 324 additions and 68 deletions
@@ -127,10 +127,11 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
}
private func createDirectRoom(with user: UserProfile) async {
defer {
hideLoadingIndicator()
}
showLoadingIndicator()
let result = await clientProxy.createDirectRoom(with: user.userID)
hideLoadingIndicator()
switch result {
switch await clientProxy.createDirectRoom(with: user.userID, expectedRoomName: user.displayName) {
case .success(let roomId):
actionsSubject.send(.openRoom(withIdentifier: roomId))
case .failure(let failure):