From 6e49fc5c4273e7597925c133c3a6985b6ad85ecc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Mar 2019 23:39:03 +0300 Subject: First RC --- Juick/ViewControllers/FeedViewController.m | 35 +++--------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'Juick/ViewControllers/FeedViewController.m') diff --git a/Juick/ViewControllers/FeedViewController.m b/Juick/ViewControllers/FeedViewController.m index d7b51a8..b6b578f 100644 --- a/Juick/ViewControllers/FeedViewController.m +++ b/Juick/ViewControllers/FeedViewController.m @@ -22,41 +22,12 @@ -(void) viewDidLoad { self.messagesDelegate = self; - if ([[APIClient sharedClient] isAuthenticated]) { - [[APIClient sharedClient] authenticate:^(User *user, NSError *error) { - if (user) { - if ([self.path length] == 0) { - self.path = [APIClient feedUrl]; - self.navigationController.visibleViewController.navigationItem.title = @"My feed"; - } - [self setShouldScrollToBottomOnRefresh:NO]; - [self refreshData]; - } else { - [User throwUnableToLogin:self error:error]; - } - }]; - - } else { - if ([self.path length] == 0) { - self.path = [APIClient messagesUrl]; - self.navigationController.visibleViewController.navigationItem.title = @"Discover"; - } - [self setShouldScrollToBottomOnRefresh:NO]; - [self refreshData]; - } + self.title = @"Today"; + self.path = [APIClient feedUrl]; + [self setShouldScrollToBottomOnRefresh:NO]; [super viewDidLoad]; } -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - if (!self.dataLoading) { - MessageCell *cell = (MessageCell *)[super tableView:tableView cellForRowAtIndexPath:indexPath]; - cell.delegate = self; - return cell; - } else { - return [super tableView:tableView cellForRowAtIndexPath:indexPath]; - } -} - -(void)avatarClicked:(NSString *)uname { self.selectedUser = uname; [self performSegueWithIdentifier:@"profileSegue" sender:self]; -- cgit v1.2.3