From 34ab27a0edd12c58504c5b8af7457796a525f5e8 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 26 Oct 2023 14:01:53 +0200 Subject: [PATCH] test QLPreviewController.canPreview() as an alternaive --- deltachat-ios/Chat/ChatViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deltachat-ios/Chat/ChatViewController.swift b/deltachat-ios/Chat/ChatViewController.swift index 8f8213cde..00d6ceddc 100644 --- a/deltachat-ios/Chat/ChatViewController.swift +++ b/deltachat-ios/Chat/ChatViewController.swift @@ -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