diff options
Diffstat (limited to 'Juick/ViewControllers/DiscoverViewController.m')
-rw-r--r-- | Juick/ViewControllers/DiscoverViewController.m | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index 11010ae..3b01297 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -28,7 +28,8 @@ AppDelegate *appDelegate; if (success) { if ([self.path length] == 0) { self.path = [APIClient feedUrl]; - [self.navigationController.visibleViewController setTitle:@"My feed"]; + [self.tabBarItem setTitle:@"My feed"]; + self.navigationController.visibleViewController.navigationItem.title = @"My feed"; } [self refreshData:NO]; } else { @@ -39,7 +40,8 @@ AppDelegate *appDelegate; } else { if ([self.path length] == 0) { self.path = [APIClient messagesUrl]; - [self.navigationController.visibleViewController setTitle:@"Discover"]; + [self.tabBarItem setTitle:@"Discover"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discover"; } [self refreshData:NO]; } @@ -81,24 +83,27 @@ AppDelegate *appDelegate; UIAlertController *filterAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"My feed" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"My feed"]; self.path = [APIClient feedUrl]; + [self.tabBarItem setTitle:@"My feed"]; + self.navigationController.visibleViewController.navigationItem.title = @"My feed"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; [self refreshData:NO]; }]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Discover" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"Discover"]; self.path = [APIClient messagesUrl]; + [self.tabBarItem setTitle:@"Discover"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discover"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; [self refreshData:NO]; }]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Discussions" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"Discussions"]; self.path = [APIClient discussionsUrl]; + [self.tabBarItem setTitle:@"Discussions"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discussions"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; |