diff options
Diffstat (limited to 'Juick/ViewControllers/FeedViewController.m')
-rw-r--r-- | Juick/ViewControllers/FeedViewController.m | 35 |
1 files changed, 3 insertions, 32 deletions
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]; |