From 2eaeaf327757f10d16342fb436f6609ccb8af5fa Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 13 May 2020 21:20:22 -0400 Subject: [PATCH] Fix previewing gifv attacments --- Tusker/Views/Attachments/AttachmentView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tusker/Views/Attachments/AttachmentView.swift b/Tusker/Views/Attachments/AttachmentView.swift index 98d314d88e..10f6112f2f 100644 --- a/Tusker/Views/Attachments/AttachmentView.swift +++ b/Tusker/Views/Attachments/AttachmentView.swift @@ -198,6 +198,10 @@ extension AttachmentView: UIContextMenuInteractionDelegate { return UIContextMenuConfiguration(identifier: nil, previewProvider: { () -> UIViewController? in if self.attachment.kind == .image { return AttachmentPreviewViewController(attachment: self.attachment) + } else if self.attachment.kind == .gifv { + let vc = GifvAttachmentViewController(attachment: self.attachment) + vc.preferredContentSize = self.image?.size ?? .zero + return vc } else { return self.delegate?.attachmentViewGallery(startingAt: self.index) }