mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
vector-im/element-meta/issues/2213 - Automatically pop the invites list when acting on the last one. Coming back from the room will go directly back to the room list
This commit is contained in:
committed by
Stefan Ceriu
parent
07eccbee8c
commit
59eb253980
@@ -97,6 +97,12 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
switch action {
|
switch action {
|
||||||
case .presentedRoom(let roomID):
|
case .presentedRoom(let roomID):
|
||||||
analytics.signpost.beginRoomFlow(roomID)
|
analytics.signpost.beginRoomFlow(roomID)
|
||||||
|
|
||||||
|
let availableInvitesCount = userSession.clientProxy.inviteSummaryProvider?.roomListPublisher.value.count ?? 0
|
||||||
|
if case .invitesScreen = stateMachine.state, availableInvitesCount == 1 {
|
||||||
|
dismissInvitesList(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
stateMachine.processEvent(.selectRoom(roomID: roomID))
|
stateMachine.processEvent(.selectRoom(roomID: roomID))
|
||||||
case .dismissedRoom:
|
case .dismissedRoom:
|
||||||
stateMachine.processEvent(.deselectRoom)
|
stateMachine.processEvent(.deselectRoom)
|
||||||
@@ -521,6 +527,14 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func dismissInvitesList(animated: Bool) {
|
||||||
|
guard case .invitesScreen = stateMachine.state else {
|
||||||
|
fatalError()
|
||||||
|
}
|
||||||
|
|
||||||
|
sidebarNavigationStackCoordinator.pop(animated: animated)
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: Calls
|
// MARK: Calls
|
||||||
|
|
||||||
private func presentCallScreen(roomProxy: RoomProxyProtocol) {
|
private func presentCallScreen(roomProxy: RoomProxyProtocol) {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Automatically pop the invites list when acting on the last one. Coming back from the room will go directly back to the room list
|
||||||
Reference in New Issue
Block a user