2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00
mastodon-ios/Mastodon/Helper/URLActivityItem.swift
Nathan Mattes 23a505b321
Show more metadata for posts (#1200)
* Show first image when sharing (#1199)

* Don't share custom metadata (#1199)

🤦 that was way to easy, thanks docs!

* If we only share an URL, we don't need metadata (#1199)
2024-02-09 11:14:51 +01:00

26 lines
565 B
Swift

//
// URLActivityItem.swift
// Mastodon
//
// Created by Jed Fox on 2022-12-03.
//
import UIKit
import LinkPresentation
class URLActivityItem: NSObject, UIActivityItemSource {
let url: URL
init(url: URL) {
self.url = url
}
func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any {
return url
}
func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
return url
}
}