summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-02 19:06:38 +0300
committerGravatar Vitaly Takmazov2019-10-02 19:06:38 +0300
commit633abd8498f2ef52d7e2989e111d55012053ad74 (patch)
treefab65f0d721d0ac47ff49864240061b54b71dd5b
parentbf573afb9d05ce34ecd22b3dca85aca2c3896ae6 (diff)
Cleanup titles
-rw-r--r--Juick/ViewControllers/DialogsViewController.m5
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m1
-rw-r--r--Juick/ViewControllers/DiscussionsController.m1
-rw-r--r--Juick/ViewControllers/FeedViewController.m1
-rw-r--r--Juick/ViewControllers/MessagesViewController.m4
-rw-r--r--Juick/ViewControllers/ThreadViewController.m1
6 files changed, 8 insertions, 5 deletions
diff --git a/Juick/ViewControllers/DialogsViewController.m b/Juick/ViewControllers/DialogsViewController.m
index 31a4e8b..0ac22df 100644
--- a/Juick/ViewControllers/DialogsViewController.m
+++ b/Juick/ViewControllers/DialogsViewController.m
@@ -15,7 +15,6 @@
@implementation DialogsViewController
- (void)viewDidLoad {
[super viewDidLoad];
- self.navigationController.visibleViewController.title = @"Chats";
[self.view setBackgroundColor:[UIColor colorNamed:@"Background"]];
[self.tableView registerNib:[UINib nibWithNibName:@"ConversationCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"notificationCell"];
[self refreshData];
@@ -23,6 +22,10 @@
[self.refreshControl addTarget:self action:@selector(refreshData) forControlEvents:UIControlEventValueChanged];
}
+- (void)viewWillAppear:(BOOL)animated {
+ self.navigationController.visibleViewController.title = self.title;
+}
+
- (void) refreshData {
self.chats = [NSMutableArray array];
[self.tableView reloadData];
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index 2b69c6f..7bf9f74 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -19,7 +19,6 @@
self.title = @"Discover";
self.path = [APIClient messagesUrl];
[self setShouldScrollToUnreadOnRefresh:NO];
- self.navigationController.visibleViewController.title = @"Discover";
[super viewDidLoad];
}
diff --git a/Juick/ViewControllers/DiscussionsController.m b/Juick/ViewControllers/DiscussionsController.m
index 03226ae..607ac26 100644
--- a/Juick/ViewControllers/DiscussionsController.m
+++ b/Juick/ViewControllers/DiscussionsController.m
@@ -20,7 +20,6 @@
self.title = @"Discussions";
self.path = [APIClient discussionsUrl];
[self setShouldScrollToUnreadOnRefresh:NO];
- self.navigationController.visibleViewController.title = @"Discussions";
[super viewDidLoad];
}
diff --git a/Juick/ViewControllers/FeedViewController.m b/Juick/ViewControllers/FeedViewController.m
index f1fdb0a..da1b914 100644
--- a/Juick/ViewControllers/FeedViewController.m
+++ b/Juick/ViewControllers/FeedViewController.m
@@ -25,7 +25,6 @@ NSString * const UserNotAuthenticatedNotificationName = @"UserNotAuthenticated";
-(void) viewDidLoad {
self.messagesDelegate = self;
- self.navigationController.visibleViewController.title = @"Today";
[self refreshPath];
[self setShouldScrollToUnreadOnRefresh:NO];
[super viewDidLoad];
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index 5dfbf8f..25a2ca5 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -25,6 +25,10 @@ NSString* const messageCellIdentifier = @"messageCell";
@implementation MessagesViewController
+- (void)viewWillAppear:(BOOL)animated {
+ self.navigationController.visibleViewController.title = self.title;
+}
+
-(void) refreshData {
if ([self.path length] > 0) {
self.dataLoading = YES;
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 60a115f..646dbc4 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -16,7 +16,6 @@
-(void) viewDidLoad {
- [self setTitle:@"Thread"];
[self setPath:[APIClient threadUrl]];
[super viewDidLoad];
self.messagesDelegate = self;