Suspend system activity in extensions. Issue #1427
This commit is contained in:
parent
1ae421d3c8
commit
d870c4ffb3
|
@ -116,6 +116,8 @@ public class AddWebFeedIntentHandler: NSObject, AddWebFeedIntentHandling {
|
|||
validAccount.createWebFeed(url: url.absoluteString, name: nil, container: validContainer) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
AccountManager.shared.suspendNetworkAll()
|
||||
AccountManager.shared.suspendDatabaseAll()
|
||||
completion(AddWebFeedIntentResponse(code: .success, userActivity: nil))
|
||||
case .failure(let error):
|
||||
switch error {
|
||||
|
|
|
@ -114,6 +114,8 @@ class ShareViewController: SLComposeServiceViewController, ShareFolderPickerCont
|
|||
switch result {
|
||||
case .success:
|
||||
account!.save()
|
||||
AccountManager.shared.suspendNetworkAll()
|
||||
AccountManager.shared.suspendDatabaseAll()
|
||||
self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
|
||||
case .failure(let error):
|
||||
self.presentError(error) {
|
||||
|
|
Loading…
Reference in New Issue