diff options
author | Vitaly Takmazov | 2019-03-21 23:39:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-03-21 23:39:03 +0300 |
commit | 6e49fc5c4273e7597925c133c3a6985b6ad85ecc (patch) | |
tree | ca5c8bac8e6bbe73d28db597be38840a4e88deca /Juick/ViewControllers/FeedViewController.m | |
parent | 31cee12a4f5c2733965e99e2fa9add28fee266c2 (diff) |
First RC
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]; |