summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-11 01:12:45 +0300
committerGravatar Vitaly Takmazov2017-12-11 01:12:45 +0300
commitf7f8db8f83c63498fca1fb3a8037fbee7b3397e6 (patch)
treec33e932848c79d1a23b1526f029b12c81e8dd711 /Juick/AppDelegate.m
parent8efa5a0bdfd968d2f57591db69f7ec87f65bfc24 (diff)
another try to fix push
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 4cd7f2d..b38168c 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -16,6 +16,7 @@
#import "User.h"
#import "DeviceRegistration.h"
#import "NewPostViewController.h"
+#import "DiscoverViewController.h"
@interface AppDelegate()
-(void) parseNotificationPayload:(NSDictionary *)userInfo;
@@ -82,7 +83,11 @@
NSDictionary *userInfo = response.notification.request.content.userInfo;
NSLog(@"User Info : %@", userInfo);
[self parseNotificationPayload:userInfo];
- [self.window.rootViewController performSegueWithIdentifier:@"threadSegue" sender:self.window.rootViewController];
+ UINavigationController *main = (UINavigationController *)self.window.rootViewController;
+ [main popToRootViewControllerAnimated:YES];
+ if ([main.visibleViewController isKindOfClass:[DiscoverViewController class]]) {
+ [main.visibleViewController performSegueWithIdentifier:@"threadViewSegue" sender:main.visibleViewController];
+ }
completionHandler();
}