DiffableDataSource.CollectionView implementation

This commit is contained in:
John Estropia
2019-10-16 14:01:25 +09:00
parent 7932625644
commit 64a0264354
14 changed files with 383 additions and 90 deletions

View File

@@ -38,13 +38,13 @@ extension DataStack {
- parameter object: the `ObjectRepresentation` to observe changes from
- returns: a `ObjectMonitor` that monitors changes to `object`
*/
public func monitorObject<O: ObjectRepresentation>(_ object: O) -> ObjectMonitor<O.ObjectType> {
public func monitorObject<O: DynamicObject>(_ object: O) -> ObjectMonitor<O> {
Internals.assert(
Thread.isMainThread,
"Attempted to observe objects from \(Internals.typeName(self)) outside the main thread."
)
return ObjectMonitor(dataStack: self, object: object)
return .init(objectID: object.cs_id(), context: self.unsafeContext())
}
/**