forked from shadowfacts/Tusker
Fix previewing gifv attacments
This commit is contained in:
parent
d396eb0823
commit
2eaeaf3277
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue