diff options
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index cf2afa8..802bbab 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -95,10 +95,11 @@ [main setSelectedIndex:0]; UINavigationController *discover = (UINavigationController *)[main.viewControllers objectAtIndex:0]; [discover popToRootViewControllerAnimated:NO]; - [[discover.viewControllers objectAtIndex:0] performSegueWithIdentifier:@"threadViewSegue" sender:discover]; + MessagesViewController *msgVC = (MessagesViewController *)[discover.viewControllers objectAtIndex:0]; + [msgVC viewThreadForMessage:nil mid:self.pushedThread]; } else { - [main setSelectedIndex:1]; - UINavigationController *dialogs = (UINavigationController *)[main.viewControllers objectAtIndex:1]; + [main setSelectedIndex:2]; + UINavigationController *dialogs = (UINavigationController *)[main.viewControllers objectAtIndex:2]; [[dialogs.viewControllers objectAtIndex:0] performSegueWithIdentifier:@"chatSegue" sender:dialogs]; } }]; @@ -128,4 +129,9 @@ return (AppDelegate *)[UIApplication sharedApplication].delegate; } ++ (id)threadViewController { + UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; + return [mainStoryboard instantiateViewControllerWithIdentifier:@"threadViewControllerIdentifier"]; +} + @end |