From 3c8097404f2a04bfc3a00ecfae05f54cca24f0a8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 16 Dec 2019 17:04:00 -0800 Subject: [PATCH] Make progress on update ArticleFetcher to handle DatabaseQueue changes. --- Frameworks/Account/ArticleFetcher.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Frameworks/Account/ArticleFetcher.swift b/Frameworks/Account/ArticleFetcher.swift index a92d1e928..09d5d63a6 100644 --- a/Frameworks/Account/ArticleFetcher.swift +++ b/Frameworks/Account/ArticleFetcher.swift @@ -19,8 +19,8 @@ public protocol ArticleFetcher { extension WebFeed: ArticleFetcher { - public func fetchArticles() -> Set
{ - return account?.fetchArticles(.webFeed(self)) ?? Set
() + public func fetchArticles() throws -> Set
{ + return try account?.fetchArticles(.webFeed(self)) ?? Set
() } public func fetchArticlesAsync(_ completion: @escaping ArticleSetBlock) { @@ -48,12 +48,12 @@ extension WebFeed: ArticleFetcher { extension Folder: ArticleFetcher { - public func fetchArticles() -> Set
{ + public func fetchArticles() throws -> Set
{ guard let account = account else { assertionFailure("Expected folder.account, but got nil.") return Set
() } - return account.fetchArticles(.folder(self, false)) + return try account.fetchArticles(.folder(self, false)) } public func fetchArticlesAsync(_ completion: @escaping ArticleSetBlock) { @@ -65,12 +65,12 @@ extension Folder: ArticleFetcher { account.fetchArticlesAsync(.folder(self, false), completion) } - public func fetchUnreadArticles() -> Set
{ + public func fetchUnreadArticles() throws -> Set
{ guard let account = account else { assertionFailure("Expected folder.account, but got nil.") return Set
() } - return account.fetchArticles(.folder(self, true)) + return try account.fetchArticles(.folder(self, true)) } public func fetchUnreadArticlesAsync(_ completion: @escaping ArticleSetBlock) {