summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/DialogsViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-04 11:50:14 +0300
committerGravatar Vitaly Takmazov2018-03-04 11:50:22 +0300
commita04f0db29cb280eb45888d3a56967cf9adc6214d (patch)
treeb1625107b75a906b7b402296b3a93ca11a578633 /Juick/ViewControllers/DialogsViewController.m
parent782219f3cdc8cac644cc33657813a5f8319dbae7 (diff)
ChatViewController
Diffstat (limited to 'Juick/ViewControllers/DialogsViewController.m')
-rw-r--r--Juick/ViewControllers/DialogsViewController.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/Juick/ViewControllers/DialogsViewController.m b/Juick/ViewControllers/DialogsViewController.m
index 8eea017..878e912 100644
--- a/Juick/ViewControllers/DialogsViewController.m
+++ b/Juick/ViewControllers/DialogsViewController.m
@@ -7,6 +7,7 @@
//
#import "DialogsViewController.h"
+#import "ChatViewController.h"
#import "ColorScheme.h"
#import "ConversationCell.h"
#import "APIClient.h"
@@ -53,5 +54,17 @@
return cell;
}
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ [self performSegueWithIdentifier:@"chatSegue" sender:self];
+}
+
+-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+ if ([segue.identifier isEqualToString:@"chatSegue"]) {
+ Chat *chat = [self.chats objectAtIndex:[self.tableView indexPathForSelectedRow].row];
+ ChatViewController *vc = (ChatViewController *)segue.destinationViewController;
+ [vc setUname:chat.uname];
+ }
+}
+
@end