mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-23 18:01:23 +01:00
Merge branch 'develop' into corestore2_develop
This commit is contained in:
@@ -83,7 +83,7 @@ public final class ListMonitor<T: NSManagedObject>: Hashable {
|
|||||||
*/
|
*/
|
||||||
public subscript(index: Int) -> T {
|
public subscript(index: Int) -> T {
|
||||||
|
|
||||||
return self[0, index]
|
return self.objectsInAllSections()[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,7 +94,12 @@ public final class ListMonitor<T: NSManagedObject>: Hashable {
|
|||||||
*/
|
*/
|
||||||
public subscript(safeIndex index: Int) -> T? {
|
public subscript(safeIndex index: Int) -> T? {
|
||||||
|
|
||||||
return self[safeSectionIndex: 0, safeItemIndex: index]
|
let objects = self.objectsInAllSections()
|
||||||
|
guard objects.indices.contains(index) else {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return objects[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user