summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/DiscoverViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-02 00:31:43 +0300
committerGravatar Vitaly Takmazov2018-04-02 00:31:43 +0300
commitf153a400634d4aa726dafd2257921b904c92824b (patch)
tree51ed90b89ccd0eebc4abc85a2e888b65009d34a1 /Juick/ViewControllers/DiscoverViewController.m
parentc623f12b2d5e95708a3971e642410c9098f71285 (diff)
multiple fixes
Diffstat (limited to 'Juick/ViewControllers/DiscoverViewController.m')
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m15
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];