Don't use old section info from an old NSFetchedResultsSectionInfo object.
This commit is contained in:
parent
a8bb434ded
commit
bc88daf08d
@ -370,7 +370,9 @@ referenceSizeForHeaderInSection:(NSInteger)section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[self.fetchedResultsController.managedObjectContext performBlock:^{
|
[self.fetchedResultsController.managedObjectContext performBlock:^{
|
||||||
NSArray *oldSections = [self.fetchedResultsController sections];
|
NSMutableArray *oldSections = [NSMutableArray arrayWithCapacity:[[self.fetchedResultsController sections] count]];
|
||||||
|
for (id<NSFetchedResultsSectionInfo> section in [self.fetchedResultsController sections])
|
||||||
|
[oldSections addObject:[section.objects copy]];
|
||||||
|
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
self.fetchedResultsController.fetchRequest.predicate =
|
self.fetchedResultsController.fetchRequest.predicate =
|
||||||
@ -391,7 +393,7 @@ referenceSizeForHeaderInSection:(NSInteger)section {
|
|||||||
else if (section >= toSections)
|
else if (section >= toSections)
|
||||||
[self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
|
[self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
|
||||||
else
|
else
|
||||||
[self.passwordCollectionView reloadItemsFromArray:[oldSections[section] objects]
|
[self.passwordCollectionView reloadItemsFromArray:oldSections[section]
|
||||||
toArray:[[self.fetchedResultsController sections][section] objects]
|
toArray:[[self.fetchedResultsController sections][section] objects]
|
||||||
inSection:section];
|
inSection:section];
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ shopt -s extglob
|
|||||||
|
|
||||||
|
|
||||||
## Submodules that need to be checked out.
|
## Submodules that need to be checked out.
|
||||||
dependencies=( External/{InAppSettingsKit,Pearl{,:External/jrswizzle,:External/uicolor-utilities},UbiquityStoreManager,RHStatusItemView,LoveLyndir} )
|
dependencies=( External/{InAppSettingsKit,Pearl{,:External/jrswizzle,:External/uicolor-utilities},UbiquityStoreManager,RHStatusItemView} )
|
||||||
|
|
||||||
## Custom migration.
|
## Custom migration.
|
||||||
# None yet.
|
# None yet.
|
||||||
|
Loading…
Reference in New Issue
Block a user