summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-02 18:49:12 +0300
committerGravatar Vitaly Takmazov2018-04-02 18:49:12 +0300
commitd36ac364cb74beaf4ced4a12e5bbd5eeab8ec008 (patch)
tree05e238131b9e7f9812e42d3f156113d131290987 /Juick/AppDelegate.m
parentf153a400634d4aa726dafd2257921b904c92824b (diff)
another try to fix navigation from notification
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m9
1 files changed, 4 insertions, 5 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 4fa1f92..202ac82 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -84,11 +84,10 @@
NSDictionary *userInfo = response.notification.request.content.userInfo;
NSLog(@"User Info : %@", userInfo);
[self parseNotificationPayload:userInfo];
- UINavigationController *main = (UINavigationController *)self.window.rootViewController;
- [main popToRootViewControllerAnimated:NO];
- if ([main.visibleViewController isKindOfClass:[DiscoverViewController class]]) {
- [main.visibleViewController performSegueWithIdentifier:@"threadViewSegue" sender:main.visibleViewController];
- }
+ UITabBarController *main = (UITabBarController *)self.window.rootViewController;
+ [main setSelectedIndex:0];
+ UINavigationController *discover = (UINavigationController *)[main.viewControllers objectAtIndex:0];
+ [discover performSegueWithIdentifier:@"threadViewSegue" sender:discover];
completionHandler();
}