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
|
validAccount.createWebFeed(url: url.absoluteString, name: nil, container: validContainer) { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
|
AccountManager.shared.suspendNetworkAll()
|
||||||
|
AccountManager.shared.suspendDatabaseAll()
|
||||||
completion(AddWebFeedIntentResponse(code: .success, userActivity: nil))
|
completion(AddWebFeedIntentResponse(code: .success, userActivity: nil))
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
switch error {
|
switch error {
|
||||||
|
|
|
@ -114,6 +114,8 @@ class ShareViewController: SLComposeServiceViewController, ShareFolderPickerCont
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
account!.save()
|
account!.save()
|
||||||
|
AccountManager.shared.suspendNetworkAll()
|
||||||
|
AccountManager.shared.suspendDatabaseAll()
|
||||||
self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
|
self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
self.presentError(error) {
|
self.presentError(error) {
|
||||||
|
|
Loading…
Reference in New Issue