diff options
author | Vitaly Takmazov | 2019-10-02 17:16:01 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-10-02 17:16:01 +0300 |
commit | bf573afb9d05ce34ecd22b3dca85aca2c3896ae6 (patch) | |
tree | 2b55dfddb6d31f81294f2554d85bf41607a63f07 /Juick/ViewControllers/ThreadViewController.m | |
parent | 33539a3c9c8534776722aa1148499f984e0019e7 (diff) |
Shared navigation
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 { |