#1455 (crash opening notifications)

This commit is contained in:
David Sinclair 2021-06-04 21:49:08 -07:00
parent 8760fef8cd
commit cad8017b5c
4 changed files with 19 additions and 14 deletions

View file

@ -2512,7 +2512,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
// popToViewController:[self.appDelegate.feedsNavigationController.viewControllers
// objectAtIndex:0]
// animated:YES];
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
[self.appDelegate showColumn:UISplitViewControllerColumnPrimary debugInfo:@"deleteSite"];
[MBProgressHUD hideHUDForView:self.view animated:YES];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[self requestFailed:error];
@ -2539,7 +2539,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
// popToViewController:[self.appDelegate.feedsNavigationController.viewControllers
// objectAtIndex:0]
// animated:YES];
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
[self.appDelegate showColumn:UISplitViewControllerColumnPrimary debugInfo:@"deleteFolder"];
[MBProgressHUD hideHUDForView:self.view animated:YES];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[self requestFailed:error];
@ -2567,7 +2567,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
[self.appDelegate reloadFeedsView:YES];
// [self.appDelegate.feedsNavigationController popToViewController:[self.appDelegate.feedsNavigationController.viewControllers objectAtIndex:0]
// animated:YES];
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
[self.appDelegate showColumn:UISplitViewControllerColumnPrimary debugInfo:@"muteSite"];
[MBProgressHUD hideHUDForView:self.view animated:YES];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[self requestFailed:error];

View file

@ -321,6 +321,7 @@ SFSafariViewControllerDelegate> {
- (void)resizePreviewSize;
- (void)resizeFontSize;
- (void)popToRootWithCompletion:(void (^)(void))completion;
- (void)showColumn:(UISplitViewControllerColumn)column debugInfo:(NSString *)debugInfo;
- (void)showMoveSite;
- (void)openTrainSite;

View file

@ -777,13 +777,21 @@
}
[self.splitViewController dismissViewControllerAnimated:NO completion:nil];
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
[self showColumn:UISplitViewControllerColumnPrimary debugInfo:@"popToRootWithCompletion"];
if (completion) {
[CATransaction commit];
}
}
- (void)showColumn:(UISplitViewControllerColumn)column debugInfo:(NSString *)debugInfo {
NSLog(@"⚠️ show column for %@: split view controller: %@ split nav: %@; split controllers: %@; detail controller: %@; detail nav: %@; detail nav controllers: %@", debugInfo, self.splitViewController, self.splitViewController.navigationController, self.splitViewController.viewControllers, self.detailViewController, self.detailViewController.navigationController, self.detailViewController.navigationController.viewControllers); // log
[self.splitViewController showColumn:column];
NSLog(@"...shown"); // log
}
- (void)showPremiumDialog {
if (self.premiumNavigationController == nil) {
self.premiumNavigationController = [[UINavigationController alloc]
@ -1580,7 +1588,7 @@
[self.feedDetailViewController.storyTitlesTable reloadData];
if (detailViewController.storyTitlesOnLeft && [[UIDevice currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPhone) {
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
[self showColumn:UISplitViewControllerColumnSupplementary debugInfo:@"loadFeedDetailView"];
}
if (feedDetailViewController.view.window == nil) {
@ -1943,7 +1951,7 @@
}
[navController showViewController:feedDetailViewController sender:self];
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
[self showColumn:UISplitViewControllerColumnSupplementary debugInfo:@"loadRiverFeedDetailView"];
}
[self flushQueuedReadStories:NO withCallback:^{
@ -2304,7 +2312,7 @@
if (self.splitViewController.isCollapsed) {
[self.feedsNavigationController popToRootViewControllerAnimated:YES];
} else {
[self.splitViewController showColumn:UISplitViewControllerColumnPrimary];
[self showColumn:UISplitViewControllerColumnPrimary debugInfo:@"showFeedsListAnimated"];
}
}

View file

@ -968,7 +968,7 @@
[pageController clearStory];
//TODO: might want to check if overlay display, or something, to avoid doing this on compact layout
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
[self.appDelegate showColumn:UISplitViewControllerColumnSupplementary debugInfo:@"applyNewIndex"];
}
if (!suppressRedraw) {
@ -1177,11 +1177,7 @@
}
if (self.isPhoneOrCompact || animated) {
NSLog(@"⚠️ showing story pages: split view controller: %@ split nav: %@; split controllers: %@; detail controller: %@; detail nav: %@; detail nav controllers: %@", appDelegate.splitViewController, appDelegate.splitViewController.navigationController, appDelegate.splitViewController.viewControllers, appDelegate.detailViewController, appDelegate.detailViewController.navigationController, appDelegate.detailViewController.navigationController.viewControllers); // log
[appDelegate.splitViewController showColumn:UISplitViewControllerColumnSecondary];
NSLog(@"...shown"); // log
[appDelegate showColumn:UISplitViewControllerColumnSecondary debugInfo:@"changePage"];
}
[self becomeFirstResponder];
@ -1848,7 +1844,7 @@
// popToViewController:[appDelegate.feedsNavigationController.viewControllers
// objectAtIndex:0]
// animated:YES];
[self.splitViewController showColumn:UISplitViewControllerColumnSupplementary];
[self.appDelegate showColumn:UISplitViewControllerColumnSupplementary debugInfo:@"doPreviousStory"];
[appDelegate hideStoryDetailView];
} else {
NSInteger previousLocation = [appDelegate.storiesCollection locationOfStoryId:previousStoryId];