Fix previewing gifv attacments

This commit is contained in:
Shadowfacts 2020-05-13 21:20:22 -04:00
parent d396eb0823
commit 2eaeaf3277
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 0 deletions

View File

@ -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)
}