mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Revert back to UIKit for the presentation of the timeline media preview. (#3719)
* Revert back to UIKit for the presentation of the timeline media preview. * Fix a presentation issue where the media is clipped until the animation finishes. * Workaround for the preview controller replacing the info button when swiping. * Use a self-sizing detent on the media info sheet.
This commit is contained in:
@@ -95,8 +95,9 @@ class MediaEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
|
||||
coordinator.actions
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .viewItem(let previewContext):
|
||||
self?.presentMediaPreview(for: previewContext)
|
||||
case .viewInRoomTimeline(let itemID):
|
||||
self?.navigationStackCoordinator.pop(animated: false)
|
||||
self?.actionsSubject.send(.viewInRoomTimeline(itemID))
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
@@ -105,27 +106,4 @@ class MediaEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
|
||||
self?.actionsSubject.send(.finished)
|
||||
}
|
||||
}
|
||||
|
||||
private func presentMediaPreview(for previewContext: TimelineMediaPreviewContext) {
|
||||
let parameters = TimelineMediaPreviewCoordinatorParameters(context: previewContext,
|
||||
mediaProvider: userSession.mediaProvider,
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: appMediator)
|
||||
|
||||
let coordinator = TimelineMediaPreviewCoordinator(parameters: parameters)
|
||||
coordinator.actionsPublisher
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .viewInRoomTimeline(let itemID):
|
||||
self?.navigationStackCoordinator.pop(animated: false)
|
||||
self?.actionsSubject.send(.viewInRoomTimeline(itemID))
|
||||
self?.navigationStackCoordinator.setFullScreenCoverCoordinator(nil)
|
||||
case .dismiss:
|
||||
self?.navigationStackCoordinator.setFullScreenCoverCoordinator(nil)
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
navigationStackCoordinator.setFullScreenCoverCoordinator(coordinator)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user