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:
Doug
2025-01-31 17:28:14 +00:00
committed by GitHub
parent ef340fb70f
commit 6cd583d904
25 changed files with 695 additions and 583 deletions
@@ -21,7 +21,7 @@ struct MediaEventsTimelineScreenCoordinatorParameters {
}
enum MediaEventsTimelineScreenCoordinatorAction {
case viewItem(TimelineMediaPreviewContext)
case viewInRoomTimeline(TimelineItemIdentifier)
}
final class MediaEventsTimelineScreenCoordinator: CoordinatorProtocol {
@@ -63,13 +63,14 @@ final class MediaEventsTimelineScreenCoordinator: CoordinatorProtocol {
viewModel = MediaEventsTimelineScreenViewModel(mediaTimelineViewModel: mediaTimelineViewModel,
filesTimelineViewModel: filesTimelineViewModel,
mediaProvider: parameters.mediaProvider,
userIndicatorController: parameters.userIndicatorController)
userIndicatorController: parameters.userIndicatorController,
appMediator: parameters.appMediator)
viewModel.actionsPublisher
.sink { [weak self] action in
switch action {
case .viewItem(let previewContext):
self?.actionsSubject.send(.viewItem(previewContext))
case .viewInRoomTimeline(let itemID):
self?.actionsSubject.send(.viewInRoomTimeline(itemID))
}
}
.store(in: &cancellables)