Move call to sendArticleStatus to delegate.
This commit is contained in:
parent
0447694142
commit
534da0bca6
|
@ -298,9 +298,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
||||||
}
|
}
|
||||||
|
|
||||||
public func refreshAll(completion: @escaping (Result<Void, Error>) -> Void) {
|
public func refreshAll(completion: @escaping (Result<Void, Error>) -> 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) {
|
public func syncArticleStatus(completion: (() -> Void)? = nil) {
|
||||||
|
|
|
@ -88,11 +88,13 @@ final class FeedbinAccountDelegate: AccountDelegate {
|
||||||
case .success():
|
case .success():
|
||||||
|
|
||||||
self.refreshArticles(account) {
|
self.refreshArticles(account) {
|
||||||
self.refreshArticleStatus(for: account) {
|
self.sendArticleStatus(for: account) {
|
||||||
self.refreshMissingArticles(account) {
|
self.refreshArticleStatus(for: account) {
|
||||||
self.refreshProgress.clear()
|
self.refreshMissingArticles(account) {
|
||||||
DispatchQueue.main.async {
|
self.refreshProgress.clear()
|
||||||
completion(.success(()))
|
DispatchQueue.main.async {
|
||||||
|
completion(.success(()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue