From 6e49fc5c4273e7597925c133c3a6985b6ad85ecc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Mar 2019 23:39:03 +0300 Subject: First RC --- Juick/AppDelegate.m | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Juick/AppDelegate.m') 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 -- cgit v1.2.3