Fix crash when sharing attachment from context menu on iPad
This commit is contained in:
parent
eafb506d64
commit
841c08be2c
|
@ -499,6 +499,7 @@ extension AttachmentView: UIContextMenuInteractionDelegate {
|
||||||
var actions = [
|
var actions = [
|
||||||
UIAction(title: "Share…", image: UIImage(systemName: "square.and.arrow.up")) { [unowned self] _ in
|
UIAction(title: "Share…", image: UIImage(systemName: "square.and.arrow.up")) { [unowned self] _ in
|
||||||
let vc = UIActivityViewController(activityItems: [itemSource], applicationActivities: [SaveToPhotosActivity()])
|
let vc = UIActivityViewController(activityItems: [itemSource], applicationActivities: [SaveToPhotosActivity()])
|
||||||
|
vc.popoverPresentationController?.sourceView = self
|
||||||
self.delegate?.attachmentViewPresent(vc, animated: true)
|
self.delegate?.attachmentViewPresent(vc, animated: true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue