diff --git a/LeStorage/StoredCollection.swift b/LeStorage/StoredCollection.swift index 9fadeb1..f66ba0b 100644 --- a/LeStorage/StoredCollection.swift +++ b/LeStorage/StoredCollection.swift @@ -433,7 +433,9 @@ public class StoredCollection: RandomAccessCollection, SomeCollecti Task { do { if let result = try await self._store.sendInsertion(instance) { - self._hasChanged = instance.copyFromServerInstance(result) + DispatchQueue.main.async { + self._hasChanged = instance.copyFromServerInstance(result) + } } } catch { Logger.error(error)