Fixes dismissing document browser on background thread
This commit is contained in:
parent
eaae38481e
commit
6b494e1113
@ -98,18 +98,20 @@ class ImportController: NSObject
|
||||
|
||||
private func finish(with urls: Set<URL>?, errors: [Error])
|
||||
{
|
||||
if let urls = urls
|
||||
{
|
||||
self.delegate?.importController(self, didImportItemsAt: urls, errors: errors)
|
||||
DispatchQueue.main.async {
|
||||
if let urls = urls
|
||||
{
|
||||
self.delegate?.importController(self, didImportItemsAt: urls, errors: errors)
|
||||
}
|
||||
else
|
||||
{
|
||||
self.delegate?.importControllerDidCancel(self)
|
||||
}
|
||||
|
||||
self.presentedViewController?.dismiss(animated: true)
|
||||
|
||||
self.presentingViewController?.importController = nil
|
||||
}
|
||||
else
|
||||
{
|
||||
self.delegate?.importControllerDidCancel(self)
|
||||
}
|
||||
|
||||
self.presentedViewController?.dismiss(animated: true)
|
||||
|
||||
self.presentingViewController?.importController = nil
|
||||
}
|
||||
|
||||
private func presentDocumentBrowser()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user