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:^{
|
||||
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];
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user