Fixing view draw issues when selecting interactions and activities from either profile views or the dashboard.

This commit is contained in:
Samuel Clay 2014-12-15 15:24:47 -08:00
parent 2246eae853
commit c167863c95
6 changed files with 40 additions and 30 deletions

View file

@ -372,7 +372,7 @@
[self.searchBar setShowsCancelButton:NO animated:YES];
}
[self testForTryFeed];
// [self testForTryFeed];
}
- (void)viewDidAppear:(BOOL)animated {
@ -410,7 +410,13 @@
[self.popoverController dismissPopoverAnimated:YES];
self.popoverController = nil;
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if (self.isMovingToParentViewController) {
appDelegate.inFindingStoryMode = NO;
appDelegate.tryFeedStoryId = nil;
[MBProgressHUD hideHUDForView:self.view animated:YES];
}
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad &&
self.isMovingToParentViewController &&
(appDelegate.masterContainerViewController.storyTitlesOnLeft ||
@ -1111,8 +1117,17 @@
if (self.isDashboardModule ||
!appDelegate.inFindingStoryMode ||
!appDelegate.tryFeedStoryId) return;
// NSLog(@"Test for try feed");
if (!self.view.window) {
NSLog(@"No longer looking for try feed.");
appDelegate.inFindingStoryMode = NO;
appDelegate.tryFeedStoryId = nil;
return;
}
NSLog(@"Test for try feed");
[MBProgressHUD hideHUDForView:self.view animated:YES];
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = @"Finding story...";
for (int i = 0; i < [storiesCollection.activeFeedStories count]; i++) {
NSString *storyIdStr = [[storiesCollection.activeFeedStories

View file

@ -592,6 +592,7 @@
}
- (void)transitionToFeedDetail:(BOOL)resetLayout {
[self hidePopover];
if (self.feedDetailIsVisible) resetLayout = NO;
self.feedDetailIsVisible = YES;
if (resetLayout) {

View file

@ -1034,14 +1034,6 @@
isSocial:(BOOL)social
withUser:(NSDictionary *)user
showFindingStory:(BOOL)showHUD {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[self.navigationController popToRootViewControllerAnimated:NO];
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
if (self.feedsViewController.popoverController) {
[self.feedsViewController.popoverController dismissPopoverAnimated:NO];
}
}
NSDictionary *feed = [self getFeed:feedId];
if (social) {
@ -1066,15 +1058,20 @@
storiesCollection.activeFeed = feed;
storiesCollection.activeFolder = nil;
[self loadFeedDetailView];
if (showHUD) {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.storyPageControl showShareHUD:@"Finding story..."];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self loadFeedDetailView];
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[self.navigationController popToRootViewControllerAnimated:NO];
if (self.feedsViewController.popoverController) {
[self.feedsViewController.popoverController dismissPopoverAnimated:YES];
}
if (self.navigationController.presentedViewController) {
[self.navigationController dismissViewControllerAnimated:YES completion:^{
[self loadFeedDetailView];
}];
} else {
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.feedDetailViewController.view animated:YES];
HUD.labelText = @"Finding story...";
}
[self loadFeedDetailView];
}
}
}

View file

@ -224,11 +224,6 @@ static UIFont *userLabelFont;
[self performSelector:@selector(fadeSelectedCell) withObject:self afterDelay:0.2];
// self.navigationController.navigationBar.backItem.title = @"All Sites";
// // reset all feed detail specific data
// appDelegate.activeFeed = nil;
// appDelegate.isSocialView = NO;
// appDelegate.isRiverView = NO;
appDelegate.inFindingStoryMode = NO;
self.interactiveFeedDetailTransition = NO;
}
@ -1132,7 +1127,7 @@ static UIFont *userLabelFont;
if (indexPath.section == 0) {
folderName = @"river_global";
} else if (indexPath.section == 1) {
folderName = @"river_blurblogs";
folderName = @"river_blurblogs";
} else if (indexPath.section == 2) {
folderName = @"everything";
} else {

View file

@ -3887,7 +3887,7 @@
"-all_load",
);
PRODUCT_NAME = NewsBlur;
PROVISIONING_PROFILE = "0a21ce12-0604-4e59-b0b1-1aa2b90afaa5";
PROVISIONING_PROFILE = "45143eee-33c3-4c7b-82e2-4b3ac0eb2170";
STRIP_INSTALLED_PRODUCT = NO;
TARGETED_DEVICE_FAMILY = "1,2";
"WARNING_CFLAGS[arch=*]" = "-Wall";
@ -3926,7 +3926,7 @@
"-all_load",
);
PRODUCT_NAME = NewsBlur;
PROVISIONING_PROFILE = "0a21ce12-0604-4e59-b0b1-1aa2b90afaa5";
PROVISIONING_PROFILE = "45143eee-33c3-4c7b-82e2-4b3ac0eb2170";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};

View file

@ -279,6 +279,8 @@ static char const * const UINavigationControllerEmbedInPopoverTagKey = "UINaviga
{
Method original, swizzle;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) return;
#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
original = class_getInstanceMethod(self, @selector(setContentSizeForViewInPopover:));
@ -313,10 +315,10 @@ static char const * const UINavigationControllerEmbedInPopoverTagKey = "UINaviga
{
[self sizzled_setPreferredContentSize:aSize];
if ([self isKindOfClass:[UINavigationController class]] == NO && self.navigationController != nil)
if ([self isKindOfClass:[UINavigationController class]] == NO && self.navigationController && self.navigationController != nil)
{
#ifdef WY_BASE_SDK_7_ENABLED
if ([self respondsToSelector:@selector(setPreferredContentSize:)]) {
if ([self.navigationController respondsToSelector:@selector(setPreferredContentSize:)]) {
[self.navigationController setPreferredContentSize:aSize];
}
#endif