summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/DialogsViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-08 14:31:34 +0300
committerGravatar Vitaly Takmazov2018-04-08 16:28:02 +0300
commita18e9ee9a3dc8b7f8ed3074893eac788bc234903 (patch)
treed3390bbf778f243bd8ef15f19d22005a8356e375 /Juick/ViewControllers/DialogsViewController.m
parent2a4770c84aaf2be9c58622f108007facef670fd3 (diff)
fix PM push
Diffstat (limited to 'Juick/ViewControllers/DialogsViewController.m')
-rw-r--r--Juick/ViewControllers/DialogsViewController.m18
1 files changed, 6 insertions, 12 deletions
diff --git a/Juick/ViewControllers/DialogsViewController.m b/Juick/ViewControllers/DialogsViewController.m
index 5369a65..a36acf3 100644
--- a/Juick/ViewControllers/DialogsViewController.m
+++ b/Juick/ViewControllers/DialogsViewController.m
@@ -13,13 +13,6 @@
#import "APIClient.h"
#import "AppDelegate.h"
-@interface DialogsViewController ()
-
-
-@property(nonatomic, strong) AppDelegate *appDelegate;
-
-@end
-
@implementation DialogsViewController
- (void)viewDidLoad {
[super viewDidLoad];
@@ -40,7 +33,6 @@
[self.tableView endUpdates];
}
}];
- self.appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate;
}
#pragma mark - Table view data source
@@ -66,10 +58,12 @@
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"chatSegue"]) {
NSString *uname;
- if ([self.appDelegate.pushedUname length] > 0) {
- uname = [self.appDelegate.pushedUname copy];
- self.appDelegate.pushedThread = nil;
- self.appDelegate.pushedUname = nil;
+ AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+ NSLog(@"pushed name is %@", appDelegate.pushedUname);
+ if ([appDelegate.pushedUname length] > 0) {
+ uname = [appDelegate.pushedUname copy];
+ appDelegate.pushedThread = nil;
+ appDelegate.pushedUname = nil;
} else {
Chat *chat = [self.chats objectAtIndex:[self.tableView indexPathForSelectedRow].row];
uname = chat.uname;