forked from shadowfacts/Tusker
Prevent incompatible items from being pasted on compose screen
This commit is contained in:
parent
e76b719c6a
commit
bebf47f05c
|
@ -108,6 +108,10 @@ class ComposeAttachmentsViewController: UITableViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func canPaste(_ itemProviders: [NSItemProvider]) -> Bool {
|
override func canPaste(_ itemProviders: [NSItemProvider]) -> Bool {
|
||||||
|
guard itemProviders.allSatisfy({ $0.canLoadObject(ofClass: CompositionAttachment.self) }) else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
switch mastodonController.instance.instanceType {
|
switch mastodonController.instance.instanceType {
|
||||||
case .pleroma:
|
case .pleroma:
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue