Contextual menu for rooms (#842)

* Add room contextual menu

* Add room context menu view actions

* Add navigation to room’s detail

* Show leave alert in HomeScreen

* Implement leave logic

* Refine leave navigation for iPad

* Optimize leave from homescreen

* Refactor roomSettings -> roomDetails

* Refactor room for id mock

* Add UTs

* Cleanup

* Fix alert presentation in RoomDetailsScreenViewModel

* Fix animation flag
This commit is contained in:
Alfonso Grillo
2023-05-04 12:02:18 +02:00
committed by GitHub
parent 86aebfb9ef
commit e9c07c9f8f
14 changed files with 242 additions and 17 deletions
@@ -20,6 +20,8 @@ import UIKit
enum HomeScreenViewModelAction {
case presentRoom(roomIdentifier: String)
case presentRoomDetails(roomIdentifier: String)
case roomLeft(roomIdentifier: String)
case presentSessionVerificationScreen
case presentSettingsScreen
case presentFeedbackScreen
@@ -36,6 +38,9 @@ enum HomeScreenViewUserMenuAction {
enum HomeScreenViewAction {
case selectRoom(roomIdentifier: String)
case showRoomDetails(roomIdentifier: String)
case leaveRoom(roomIdentifier: String)
case confirmLeaveRoom(roomIdentifier: String)
case userMenu(action: HomeScreenViewUserMenuAction)
case startChat
case verifySession
@@ -101,6 +106,7 @@ struct HomeScreenViewStateBindings {
var searchQuery = ""
var alertInfo: AlertInfo<UUID>?
var leaveRoomAlertItem: LeaveRoomAlertItem?
}
struct HomeScreenRoom: Identifiable, Equatable {