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
@@ -156,13 +156,14 @@ enum TimelineMediaPreviewItem: Equatable {
// MARK: QLPreviewItem
var previewItemURL: URL? {
// Falling back to a clear image allows the presentation animation to work when
// the item is in the event cache and just needs to be loaded from the store.
fileHandle?.url ?? Bundle.main.url(forResource: "clear", withExtension: "png")
fileHandle?.url
}
var previewItemTitle: String? {
filename
switch fileHandle?.url {
case .some: filename
case .none: " " // Don't show any background text when the preview is still loading.
}
}
// MARK: Event details