2
0

Release build fixes.

This commit is contained in:
Maarten Billemont 2014-08-22 00:56:02 -04:00
parent 56bb5bf5db
commit a4fe13842a
2 changed files with 6 additions and 19 deletions

View File

@ -247,21 +247,15 @@ referenceSizeForHeaderInSection:(NSInteger)section {
[[[self.fetchedResultsController.fetchedObjects firstObject] name] isEqualToString:query]) [[[self.fetchedResultsController.fetchedObjects firstObject] name] isEqualToString:query])
_showTransientItem = NO; _showTransientItem = NO;
if ([self.passwordCollectionView numberOfSections] > 0) { if ([self.passwordCollectionView numberOfSections] > 0) {
if (!_showTransientItem && _transientItem != NSNotFound) { if (!_showTransientItem && _transientItem != NSNotFound)
dbg( @"delete transient item: %d", [self.passwordCollectionView numberOfItemsInSection:0] - 1 );
[self.passwordCollectionView deleteItemsAtIndexPaths: [self.passwordCollectionView deleteItemsAtIndexPaths:
@[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]]; @[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]];
} else if (_showTransientItem && _transientItem == NSNotFound)
else if (_showTransientItem && _transientItem == NSNotFound) {
dbg( @"insert transient item: %d", objects );
[self.passwordCollectionView insertItemsAtIndexPaths: [self.passwordCollectionView insertItemsAtIndexPaths:
@[ [NSIndexPath indexPathForItem:objects inSection:0] ]]; @[ [NSIndexPath indexPathForItem:objects inSection:0] ]];
} else if (_transientItem != NSNotFound)
else if (_transientItem != NSNotFound) {
dbg( @"reload transient item: %d", objects );
[self.passwordCollectionView reloadItemsAtIndexPaths: [self.passwordCollectionView reloadItemsAtIndexPaths:
@[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]]; @[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]];
}
} }
} }
@ -381,20 +375,14 @@ referenceSizeForHeaderInSection:(NSInteger)section {
NSInteger fromSections = self.passwordCollectionView.numberOfSections; NSInteger fromSections = self.passwordCollectionView.numberOfSections;
NSInteger toSections = [self numberOfSectionsInCollectionView:self.passwordCollectionView]; NSInteger toSections = [self numberOfSectionsInCollectionView:self.passwordCollectionView];
for (NSInteger section = 0; section < MAX( toSections, fromSections ); ++section) { for (NSInteger section = 0; section < MAX( toSections, fromSections ); ++section) {
if (section >= fromSections) { if (section >= fromSections)
dbg( @"insertSections:%d", section );
[self.passwordCollectionView insertSections:[NSIndexSet indexSetWithIndex:section]]; [self.passwordCollectionView insertSections:[NSIndexSet indexSetWithIndex:section]];
} else if (section >= toSections)
else if (section >= toSections) {
dbg( @"deleteSections:%d", section );
[self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]]; [self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
} else
else {
dbg( @"reloadItemsInSection:%d", section );
[self.passwordCollectionView reloadItemsFromArray:[oldSections[section] objects] [self.passwordCollectionView reloadItemsFromArray:[oldSections[section] objects]
toArray:[[self.fetchedResultsController sections][section] objects] toArray:[[self.fetchedResultsController sections][section] objects]
inSection:section]; inSection:section];
}
} }
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (finished) if (finished)

View File

@ -533,7 +533,6 @@
#ifdef CRASHLYTICS #ifdef CRASHLYTICS
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"]; [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].iCloudEnabled boolValue] forKey:@"iCloudEnabled"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].iCloudEnabled boolValue] forKey:@"iCloudEnabled"];
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].iCloudDecided boolValue] forKey:@"iCloudDecided"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"];