From 58b092c46e1c6f7f2a2b8fc73d2244f19a2a1aca Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 6 Oct 2015 17:07:30 -0700 Subject: [PATCH] Fixing a crash and fixing notification button. --- clients/ios/Classes/NewsBlurAppDelegate.m | 1 + clients/ios/Classes/NewsBlurViewController.m | 9 ++-- clients/ios/NewsBlur_Prefix.pch | 2 +- .../AddSiteViewController.xib | 42 +++++++++++-------- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/clients/ios/Classes/NewsBlurAppDelegate.m b/clients/ios/Classes/NewsBlurAppDelegate.m index afab38a4a..a9a3b37c7 100644 --- a/clients/ios/Classes/NewsBlurAppDelegate.m +++ b/clients/ios/Classes/NewsBlurAppDelegate.m @@ -1804,6 +1804,7 @@ for (StoryDetailViewController *page in @[storyPageControl.previousPage, storyPageControl.currentPage, storyPageControl.nextPage]) { + if (!page) continue; if ([[page.activeStory objectForKey:@"story_hash"] isEqualToString:[story objectForKey:@"story_hash"]]) { page.isRecentlyUnread = YES; diff --git a/clients/ios/Classes/NewsBlurViewController.m b/clients/ios/Classes/NewsBlurViewController.m index 7c9c743a6..7baeb32e7 100644 --- a/clients/ios/Classes/NewsBlurViewController.m +++ b/clients/ios/Classes/NewsBlurViewController.m @@ -205,7 +205,7 @@ static UIFont *userLabelFont; appDelegate.inFeedDetail = NO; // reload the data and then set the highlight again // [self.feedTitlesTable reloadData]; - [self refreshHeaderCounts]; +// [self refreshHeaderCounts]; [self redrawUnreadCounts]; // [self.feedTitlesTable selectRowAtIndexPath:self.currentRowAtIndexPath // animated:NO @@ -224,7 +224,9 @@ static UIFont *userLabelFont; [super viewDidAppear:animated]; [self performSelector:@selector(fadeSelectedCell) withObject:self afterDelay:0.2]; // self.navigationController.navigationBar.backItem.title = @"All Sites"; - + [self layoutHeaderCounts:nil]; + [self refreshHeaderCounts]; + self.interactiveFeedDetailTransition = NO; } @@ -1982,7 +1984,8 @@ heightForHeaderInSection:(NSInteger)section { greenIcon.frame.origin.y - 3, 100, 16); [positiveCount sizeToFit]; - [userInfoBarButton.customView sizeToFit]; + NSLog(@"User info size pre: %@", NSStringFromCGRect(userInfoBarButton.customView.frame)); + NSLog(@"User info size post: %@", NSStringFromCGRect(userInfoBarButton.customView.frame)); } - (void)showRefreshNotifier { diff --git a/clients/ios/NewsBlur_Prefix.pch b/clients/ios/NewsBlur_Prefix.pch index e510fba2d..cce13f969 100644 --- a/clients/ios/NewsBlur_Prefix.pch +++ b/clients/ios/NewsBlur_Prefix.pch @@ -5,7 +5,7 @@ #import #import -//#define DEBUG 1 +#define DEBUG 1 //#define PROD_DEBUG 1 #ifdef DEBUG diff --git a/clients/ios/Resources-iPhone/AddSiteViewController.xib b/clients/ios/Resources-iPhone/AddSiteViewController.xib index 3db7fee24..fe3d64d3a 100644 --- a/clients/ios/Resources-iPhone/AddSiteViewController.xib +++ b/clients/ios/Resources-iPhone/AddSiteViewController.xib @@ -1,8 +1,8 @@ - + - + @@ -32,6 +32,7 @@