From 4bc33d86e7bea8148d6b402bfee9c19dd1bfdbb0 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 5 Aug 2024 19:48:44 +0200 Subject: [PATCH] Update Defaults+iCloud.swift --- Sources/Defaults/Defaults+iCloud.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Defaults/Defaults+iCloud.swift b/Sources/Defaults/Defaults+iCloud.swift index f23d0e8..7876f2b 100644 --- a/Sources/Defaults/Defaults+iCloud.swift +++ b/Sources/Defaults/Defaults+iCloud.swift @@ -267,12 +267,15 @@ final class iCloudSynchronizer { guard isInserted else { return } + localKeysMonitor.add(key: key) + // If the local value is the default value, only sync from remote, since all devices should already have the default value. if key.isDefaultValue() { guard case .remote = latestDataSource(forKey: key) else { return } + syncWithoutWaiting([key], .remote) } else { syncWithoutWaiting([key])