From 534da0bca6c6caaac975808cddbcdd0b17774aec Mon Sep 17 00:00:00 2001 From: Tom Grimwood-Taylor Date: Thu, 6 Jun 2019 14:22:29 +0100 Subject: [PATCH] Move call to sendArticleStatus to delegate. --- Frameworks/Account/Account.swift | 4 +--- .../Account/Feedbin/FeedbinAccountDelegate.swift | 12 +++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index efcec7bb7..8d5564215 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -298,9 +298,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, } public func refreshAll(completion: @escaping (Result) -> Void) { - delegate.sendArticleStatus(for: self) { [unowned self] in - self.delegate.refreshAll(for: self, completion: completion) - } + self.delegate.refreshAll(for: self, completion: completion) } public func syncArticleStatus(completion: (() -> Void)? = nil) { diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index 2ee47df57..1c7a75971 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -88,11 +88,13 @@ final class FeedbinAccountDelegate: AccountDelegate { case .success(): self.refreshArticles(account) { - self.refreshArticleStatus(for: account) { - self.refreshMissingArticles(account) { - self.refreshProgress.clear() - DispatchQueue.main.async { - completion(.success(())) + self.sendArticleStatus(for: account) { + self.refreshArticleStatus(for: account) { + self.refreshMissingArticles(account) { + self.refreshProgress.clear() + DispatchQueue.main.async { + completion(.success(())) + } } } }