diff options
Diffstat (limited to 'Juick/ViewControllers/MessagesViewController.m')
-rw-r--r-- | Juick/ViewControllers/MessagesViewController.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index 12f8176..10b7c37 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -27,6 +27,8 @@ NSString* const messageCellIdentifier = @"messageCell"; -(void) applicationActivated; +@property NSString *selectedUser; + @end @implementation MessagesViewController @@ -155,6 +157,7 @@ NSString* const messageCellIdentifier = @"messageCell"; Message *msg = [self.messages objectAtIndex:indexPath.row]; MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:messageCellIdentifier forIndexPath:indexPath]; [cell configureWithMessage:msg selectable:self.shouldAllowToSelectText]; + cell.delegate = self; return cell; } } @@ -219,6 +222,18 @@ NSString* const messageCellIdentifier = @"messageCell"; return configuration; } +-(void)avatarClicked:(NSString *)uname { + /*self.selectedUser = uname; + [self performSegueWithIdentifier:@"profileSegue" sender:self];*/ +} + +-(void)linkClicked:(NSString *)urlString { + NSURL *url = [NSURL URLWithString:urlString]; + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) { + + }]; +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; |