Ensure status changes are sent before refresh.

When the refresh button was manually clicked a full refresh would occur,
but locally changed statuses wouldn't be sent. This meant the statuses
of items in NetNewsWire would revert to their remote values until an
automatic status sync was triggered.
This commit is contained in:
Tom Grimwood-Taylor 2019-06-05 21:17:43 +01:00
parent 3c1b84dd73
commit b4d7042a7b
1 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,9 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
}
public func refreshAll(completion: @escaping (Result<Void, Error>) -> Void) {
self.delegate.refreshAll(for: self, completion: completion)
delegate.sendArticleStatus(for: self) { [unowned self] in
self.delegate.refreshAll(for: self, completion: completion)
}
}
public func syncArticleStatus(completion: (() -> Void)? = nil) {