mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +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:
parent
07eccbee8c
commit
59eb253980
@ -97,6 +97,12 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
switch action {
|
||||
case .presentedRoom(let 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))
|
||||
case .dismissedRoom:
|
||||
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
|
||||
|
||||
private func presentCallScreen(roomProxy: RoomProxyProtocol) {
|
||||
|
1
changelog.d/pr-2213.change
Normal file
1
changelog.d/pr-2213.change
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user