parent
56a0518c80
commit
4a89ae3cfe
|
@ -59,7 +59,7 @@ extension MenuActionProvider {
|
|||
draft.visibility = .direct
|
||||
self.navigationDelegate?.compose(editing: draft)
|
||||
}),
|
||||
UIDeferredMenuElement({ (elementHandler) in
|
||||
UIDeferredMenuElement.uncachedIfPossible({ (elementHandler) in
|
||||
Task { @MainActor in
|
||||
if let action = await self.followAction(for: accountID, mastodonController: mastodonController) {
|
||||
elementHandler([action])
|
||||
|
@ -339,3 +339,13 @@ extension SFSafariViewController: CustomPreviewPresenting {
|
|||
presenter.present(self, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
private extension UIDeferredMenuElement {
|
||||
static func uncachedIfPossible(_ elementProvider: @escaping (@escaping ([UIMenuElement]) -> Void) -> Void) -> UIDeferredMenuElement {
|
||||
if #available(iOS 15.0, *) {
|
||||
return UIDeferredMenuElement.uncached(elementProvider)
|
||||
} else {
|
||||
return UIDeferredMenuElement(elementProvider)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue