Fix crash when sharing attachment from context menu on iPad

This commit is contained in:
Shadowfacts 2024-03-30 14:43:03 -04:00
parent eafb506d64
commit 841c08be2c
1 changed files with 1 additions and 0 deletions

View File

@ -499,6 +499,7 @@ extension AttachmentView: UIContextMenuInteractionDelegate {
var actions = [
UIAction(title: "Share…", image: UIImage(systemName: "square.and.arrow.up")) { [unowned self] _ in
let vc = UIActivityViewController(activityItems: [itemSource], applicationActivities: [SaveToPhotosActivity()])
vc.popoverPresentationController?.sourceView = self
self.delegate?.attachmentViewPresent(vc, animated: true)
}
]