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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user