From b4d7042a7b562e26e4da6c3423635d7d10c032b8 Mon Sep 17 00:00:00 2001 From: Tom Grimwood-Taylor Date: Wed, 5 Jun 2019 21:17:43 +0100 Subject: [PATCH] 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. --- Frameworks/Account/Account.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index 8d5564215..efcec7bb7 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -298,7 +298,9 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, } public func refreshAll(completion: @escaping (Result) -> 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) {