From 917fd3b930b8c25551b751608b9bd0dd104b56e5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 19 Jan 2017 23:38:50 +0300 Subject: Handle changed password --- Juick/ViewControllers/RevealPanelViewController.m | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'Juick/ViewControllers') diff --git a/Juick/ViewControllers/RevealPanelViewController.m b/Juick/ViewControllers/RevealPanelViewController.m index d890f97..b74d556 100644 --- a/Juick/ViewControllers/RevealPanelViewController.m +++ b/Juick/ViewControllers/RevealPanelViewController.m @@ -16,6 +16,7 @@ #import "NavCell.h" #import "Message.h" #import "User.h" +#import "AppDelegate.h" static NSString *CellIdentifier = @"NavCell"; @@ -79,7 +80,8 @@ static NSString *CellIdentifier = @"NavCell"; -(void) signInOut { [self refreshInfo]; - [self pushLoginForm]; + AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appDelegate pushLoginForm]; } -(void) viewWillLayoutSubviews { @@ -137,13 +139,6 @@ static NSString *CellIdentifier = @"NavCell"; return cell; } -- (void) pushLoginForm { - [self.revealViewController revealToggle:self]; - UIViewController *loginView = [[LoginViewController alloc] init]; - UINavigationController *messages = (UINavigationController *)self.revealViewController.frontViewController; - [messages pushViewController:loginView animated:YES]; -} - - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = indexPath.row; NSString *targetPath; @@ -151,7 +146,8 @@ static NSString *CellIdentifier = @"NavCell"; NSString *targetTitle; if (row == 0) { if ([[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] == nil) { - [self pushLoginForm]; + AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appDelegate pushLoginForm]; return; } else { targetTitle = @"My feed"; -- cgit v1.2.3