From 7d16bf22b2ae69a7a6512587b28414a59aa95995 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Mar 2019 13:55:21 +0300 Subject: Move isAuthenticated to APIClient --- Juick/ViewControllers/DiscoverViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Juick/ViewControllers') diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index ea720be..94e1d16 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -23,7 +23,7 @@ -(void) viewDidLoad { self.messagesDelegate = self; - if ([User isAuthenticated]) { + if ([[APIClient sharedClient] isAuthenticated]) { [[APIClient sharedClient] authenticate:^(User *user, NSError *error) { if (user) { if ([self.path length] == 0) { @@ -99,7 +99,7 @@ } } - (IBAction)filterAction:(id)sender { - if (![User isAuthenticated]) { + if (![[APIClient sharedClient] isAuthenticated]) { [self.navigationController performSegueWithIdentifier:@"loginSegue" sender:self.navigationController]; return; } -- cgit v1.2.3