From 1f3e08f107064fa429c6aa2a26702f6e63a791f0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 20 Mar 2019 01:50:48 +0300 Subject: [AppDelegate shared] --- Juick/ViewControllers/DialogsViewController.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Juick/ViewControllers/DialogsViewController.m') 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; -- cgit v1.2.3