From bada18a41215d9de28dc0fd784c5772662913166 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 5 Apr 2020 15:23:11 -0500 Subject: [PATCH] Make sure a scheduled refresh can't stack on top on one happening right for CloudKit only. --- Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index 407e4e31c..f01b94c93 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -72,6 +72,10 @@ final class CloudKitAccountDelegate: AccountDelegate { } func refreshAll(for account: Account, completion: @escaping (Result) -> Void) { + guard refreshProgress.isComplete else { + completion(.success(())) + return + } refreshAll(for: account, downloadFeeds: true, completion: completion) }