Minor fix for collection loading

upgrade
Laurent 1 month ago
parent 7d7ed5b714
commit 360fd647eb
  1. 11
      LeStorage/StoredCollection.swift

@ -82,14 +82,15 @@ public class StoredCollection<T: Storable>: SomeCollection {
fileprivate var _triggerWrite: Bool = false {
didSet {
if self._triggerWrite == true && self.inMemory == false {
self._scheduleWrite()
DispatchQueue.main.async {
NotificationCenter.default.post(
name: NSNotification.Name.CollectionDidChange, object: self)
}
self._triggerWrite = false
}
DispatchQueue.main.async {
NotificationCenter.default.post(
name: NSNotification.Name.CollectionDidChange, object: self)
}
}
}

Loading…
Cancel
Save