diff options
Diffstat (limited to 'Juick/ViewControllers/ThreadViewController.m')
-rw-r--r-- | Juick/ViewControllers/ThreadViewController.m | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m index 41e9503..60a115f 100644 --- a/Juick/ViewControllers/ThreadViewController.m +++ b/Juick/ViewControllers/ThreadViewController.m @@ -24,23 +24,21 @@ } -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:messageCellIdentifier forIndexPath:indexPath]; - if ([self shouldPerformSegueWithIdentifier:@"replySegue" sender:self]){ - [self performSegueWithIdentifier:@"replySegue" sender:cell]; + if ([self shouldPerformSegueWithIdentifier:@"editorSegue" sender:self]){ + [[AppDelegate shared] presentEditor:self]; } } -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - if ([segue.identifier isEqual: @"replySegue"]) { + if ([segue.identifier isEqual: @"editorSegue"]) { Message *msg = [self.messages objectAtIndex:[self.tableView indexPathForSelectedRow].row]; - NewPostViewController *postVC = (NewPostViewController *)[((UINavigationController *)segue.destinationViewController) - .viewControllers firstObject]; + NewPostViewController *postVC = (NewPostViewController *)segue.destinationViewController; [postVC setReplyTo:msg]; } } - (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender { - if ([identifier isEqualToString:@"replySegue"]) { + if ([identifier isEqualToString:@"editorSegue"]) { if ([[APIClient sharedClient] isAuthenticated]) { return YES; } else { |