From 841c08be2c06903cd1bf6fabd82bf31022ce6619 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 30 Mar 2024 14:43:03 -0400 Subject: [PATCH] Fix crash when sharing attachment from context menu on iPad --- Tusker/Views/Attachments/AttachmentView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Tusker/Views/Attachments/AttachmentView.swift b/Tusker/Views/Attachments/AttachmentView.swift index b28cf843..a757cb47 100644 --- a/Tusker/Views/Attachments/AttachmentView.swift +++ b/Tusker/Views/Attachments/AttachmentView.swift @@ -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) } ]