diff options
Diffstat (limited to 'Juick/ViewControllers/DialogsViewController.m')
-rw-r--r-- | Juick/ViewControllers/DialogsViewController.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Juick/ViewControllers/DialogsViewController.m b/Juick/ViewControllers/DialogsViewController.m index 05f0958..c4ace7f 100644 --- a/Juick/ViewControllers/DialogsViewController.m +++ b/Juick/ViewControllers/DialogsViewController.m @@ -66,11 +66,10 @@ -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"chatSegue"]) { NSString *uname; - AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; - if ([appDelegate.pushedUname length] > 0) { - uname = [appDelegate.pushedUname copy]; - appDelegate.pushedThread = nil; - appDelegate.pushedUname = nil; + if ([[AppDelegate shared].pushedUname length] > 0) { + uname = [[AppDelegate shared].pushedUname copy]; + [AppDelegate shared].pushedThread = nil; + [AppDelegate shared].pushedUname = nil; } else { Chat *chat = [self.chats objectAtIndex:[self.tableView indexPathForSelectedRow].row]; uname = chat.uname; |