Skip to content

Commit

Permalink
test QLPreviewController.canPreview() as an alternaive
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Oct 26, 2023
1 parent 87e778a commit 34ab27a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,8 @@ extension ChatViewController: BaseMessageCellDelegate {
if message.type == DC_MSG_WEBXDC {
showWebxdcViewFor(message: message)
} else if message.type != DC_MSG_STICKER {
// prefer previewError over QLPreviewController.canPreview().
// (the latter returns `true` for .webm - which is not wrong as _something_ is shown, even if the video cannot be played)
if previewError && message.type == DC_MSG_VIDEO {
let alert = UIAlertController(title: "To play this video, share to apps as VLC on the following page.", message: nil, preferredStyle: .safeActionSheet)
alert.addAction(UIAlertAction(title: String.localized("perm_continue"), style: .default, handler: { _ in
Expand Down

0 comments on commit 34ab27a

Please sign in to comment.