From 098f5050ebc4f4bf290cbdcf4ced8811d54746fc Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 4 Nov 2019 20:41:08 -0600 Subject: [PATCH] Cancel local account network activity when told to shutdown by the OS. Issue #1232 --- Frameworks/Account/LocalAccount/LocalAccountDelegate.swift | 2 +- Frameworks/Account/LocalAccount/LocalAccountRefresher.swift | 5 +++++ submodules/RSWeb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift index c85ca2947..25a62e74c 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift @@ -32,7 +32,7 @@ final class LocalAccountDelegate: AccountDelegate { } func cancelAll(for account: Account) { - // TODO: implement me + refresher.cancelAll() } func refreshAll(for account: Account, completion: @escaping (Result) -> Void) { diff --git a/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift b/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift index de5e08f2c..b5ad81d68 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountRefresher.swift @@ -28,6 +28,11 @@ final class LocalAccountRefresher { self.completion = completion downloadSession.downloadObjects(feeds as NSSet) } + + public func cancelAll() { + downloadSession.cancelAll() + } + } // MARK: - DownloadSessionDelegate diff --git a/submodules/RSWeb b/submodules/RSWeb index 262a22023..b2ef3e111 160000 --- a/submodules/RSWeb +++ b/submodules/RSWeb @@ -1 +1 @@ -Subproject commit 262a220230ef393edb7c003132b6cdc16a17cb5e +Subproject commit b2ef3e111339ba9dd9070ed0ded8e053135559cb