From a4fe13842ac83fa5bc7325e3c232e5911dbbd7cd Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Fri, 22 Aug 2014 00:56:02 -0400 Subject: [PATCH] Release build fixes. --- .../ObjC/iOS/MPPasswordsViewController.m | 24 +++++-------------- MasterPassword/ObjC/iOS/MPiOSAppDelegate.m | 1 - 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPPasswordsViewController.m b/MasterPassword/ObjC/iOS/MPPasswordsViewController.m index 3eaa3cab..5fd0f25b 100644 --- a/MasterPassword/ObjC/iOS/MPPasswordsViewController.m +++ b/MasterPassword/ObjC/iOS/MPPasswordsViewController.m @@ -247,21 +247,15 @@ referenceSizeForHeaderInSection:(NSInteger)section { [[[self.fetchedResultsController.fetchedObjects firstObject] name] isEqualToString:query]) _showTransientItem = NO; if ([self.passwordCollectionView numberOfSections] > 0) { - if (!_showTransientItem && _transientItem != NSNotFound) { - dbg( @"delete transient item: %d", [self.passwordCollectionView numberOfItemsInSection:0] - 1 ); + if (!_showTransientItem && _transientItem != NSNotFound) [self.passwordCollectionView deleteItemsAtIndexPaths: @[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]]; - } - else if (_showTransientItem && _transientItem == NSNotFound) { - dbg( @"insert transient item: %d", objects ); + else if (_showTransientItem && _transientItem == NSNotFound) [self.passwordCollectionView insertItemsAtIndexPaths: @[ [NSIndexPath indexPathForItem:objects inSection:0] ]]; - } - else if (_transientItem != NSNotFound) { - dbg( @"reload transient item: %d", objects ); + else if (_transientItem != NSNotFound) [self.passwordCollectionView reloadItemsAtIndexPaths: @[ [NSIndexPath indexPathForItem:_transientItem inSection:0] ]]; - } } } @@ -381,20 +375,14 @@ referenceSizeForHeaderInSection:(NSInteger)section { NSInteger fromSections = self.passwordCollectionView.numberOfSections; NSInteger toSections = [self numberOfSectionsInCollectionView:self.passwordCollectionView]; for (NSInteger section = 0; section < MAX( toSections, fromSections ); ++section) { - if (section >= fromSections) { - dbg( @"insertSections:%d", section ); + if (section >= fromSections) [self.passwordCollectionView insertSections:[NSIndexSet indexSetWithIndex:section]]; - } - else if (section >= toSections) { - dbg( @"deleteSections:%d", section ); + else if (section >= toSections) [self.passwordCollectionView deleteSections:[NSIndexSet indexSetWithIndex:section]]; - } - else { - dbg( @"reloadItemsInSection:%d", section ); + else [self.passwordCollectionView reloadItemsFromArray:[oldSections[section] objects] toArray:[[self.fetchedResultsController sections][section] objects] inSection:section]; - } } } completion:^(BOOL finished) { if (finished) diff --git a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m index 41ac3929..fd27f3e7 100644 --- a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m +++ b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m @@ -533,7 +533,6 @@ #ifdef CRASHLYTICS [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"]; [[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].helpHidden boolValue] forKey:@"helpHidden"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"];