2
0

Don't use old section info from an old NSFetchedResultsSectionInfo object.

This commit is contained in:
Maarten Billemont 2014-09-02 14:49:45 -04:00
parent a8bb434ded
commit bc88daf08d
2 changed files with 5 additions and 3 deletions

View File

@ -370,7 +370,9 @@ referenceSizeForHeaderInSection:(NSInteger)section {
}
[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;
self.fetchedResultsController.fetchRequest.predicate =
@ -391,7 +393,7 @@ referenceSizeForHeaderInSection:(NSInteger)section {
else if (section >= toSections)
[self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
else
[self.passwordCollectionView reloadItemsFromArray:[oldSections[section] objects]
[self.passwordCollectionView reloadItemsFromArray:oldSections[section]
toArray:[[self.fetchedResultsController sections][section] objects]
inSection:section];
}

View File

@ -5,7 +5,7 @@ shopt -s extglob
## 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.
# None yet.