mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Fixes #1140 - Dismiss all modals when presenting a room
This commit is contained in:
committed by
Stefan Ceriu
parent
8a69ca1ce0
commit
a73502a146
@@ -79,6 +79,10 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func stop() {
|
||||
viewModel.stop()
|
||||
}
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(RoomDetailsScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
@@ -69,6 +69,11 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func stop() {
|
||||
// Work around QLPreviewController dismissal issues, see the InteractiveQuickLookModifier.
|
||||
state.bindings.mediaPreviewItem = nil
|
||||
}
|
||||
|
||||
override func process(viewAction: RoomDetailsScreenViewAction) {
|
||||
switch viewAction {
|
||||
case .processTapPeople:
|
||||
|
||||
@@ -20,4 +20,5 @@ import Foundation
|
||||
protocol RoomDetailsScreenViewModelProtocol {
|
||||
var callback: ((RoomDetailsScreenViewModelAction) -> Void)? { get set }
|
||||
var context: RoomDetailsScreenViewModelType.Context { get }
|
||||
func stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user