Disable custom status link previews on iOS 16.4

This commit is contained in:
Shadowfacts 2023-02-19 13:49:56 -05:00
parent cb82826fcf
commit 2a892fa6ec
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ class StatusActivityItemSource: NSObject, UIActivityItemSource {
} }
func activityViewControllerLinkMetadata(_ activityViewController: UIActivityViewController) -> LPLinkMetadata? { func activityViewControllerLinkMetadata(_ activityViewController: UIActivityViewController) -> LPLinkMetadata? {
guard #unavailable(iOS 16.4) else {
// iOS 16.4 shows the full content and attachments in the Messages preview, better than what we can generate with LPLinkMetadata
return nil
}
let metadata = LPLinkMetadata() let metadata = LPLinkMetadata()
metadata.originalURL = status.url! metadata.originalURL = status.url!
metadata.url = status.url! metadata.url = status.url!