summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index 3822643..4a36cfe 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -23,7 +23,9 @@ AppDelegate *appDelegate;
-(void) viewDidLoad {
[super viewDidLoad];
appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate;
- [self performSegueWithIdentifier:@"threadViewSegue" sender:self];
+ if (appDelegate.pushedThread != nil) {
+ [self performSegueWithIdentifier:@"threadViewSegue" sender:self];
+ }
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -37,6 +39,7 @@ AppDelegate *appDelegate;
NSNumber *mid;
if (appDelegate.pushedThread != nil) {
mid = appDelegate.pushedThread;
+ appDelegate.pushedThread = nil;
} else {
Message *msg = [self.messages objectAtIndex:[self.tableView indexPathForSelectedRow].row];
mid = msg.mid;