From d958ef04d427b284ccaa161a5634cd602802d415 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 7 Dec 2017 21:24:47 +0300 Subject: fix thread push --- Juick/ViewControllers/DiscoverViewController.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Juick/ViewControllers/DiscoverViewController.m') diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index f5d362f..3822643 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -18,6 +18,14 @@ @implementation DiscoverViewController +AppDelegate *appDelegate; + +-(void) viewDidLoad { + [super viewDidLoad]; + appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate; + [self performSegueWithIdentifier:@"threadViewSegue" sender:self]; +} + -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString * cellIdentifier = @"messageCell"; MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; @@ -27,7 +35,6 @@ -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqual: @"threadViewSegue"]) { NSNumber *mid; - AppDelegate *appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate; if (appDelegate.pushedThread != nil) { mid = appDelegate.pushedThread; } else { -- cgit v1.2.3