Laurent 1 month ago
parent 6f4dc9d5f5
commit 7d7ed5b714
  1. 4
      LeStorage/StoreCenter.swift
  2. 2
      LeStorage/SyncedCollection.swift

@ -585,7 +585,7 @@ public class StoreCenter {
self.wantsToSynchronize = true self.wantsToSynchronize = true
return nil return nil
} }
Logger.log("synchronizeLastUpdates started...") Logger.log(">>> synchronizeLastUpdates started...")
self.synchronizesData = true self.synchronizesData = true
self.wantsToSynchronize = false self.wantsToSynchronize = false
@ -607,6 +607,8 @@ public class StoreCenter {
return error return error
} }
self.synchronizesData = false self.synchronizesData = false
Logger.log(">>> synchronizeLastUpdates ended.")
return nil return nil
} }

@ -441,7 +441,7 @@ public class SyncedCollection<T : SyncedStorable>: SomeSyncedCollection, Collect
if instance.lastUpdate > localInstance.lastUpdate { if instance.lastUpdate > localInstance.lastUpdate {
self.collection.update(instance, index: index, actionOption: .standard) self.collection.update(instance, index: index, actionOption: .standard)
} else { } else {
print("do not update \(T.resourceName()): \(instance.lastUpdate.timeIntervalSince1970) / local: \(localInstance.lastUpdate.timeIntervalSince1970)") // print("do not update \(T.resourceName()): \(instance.lastUpdate.timeIntervalSince1970) / local: \(localInstance.lastUpdate.timeIntervalSince1970)")
} }
} else { // insert } else { // insert
instance.sharing = shared instance.sharing = shared

Loading…
Cancel
Save