From aa6e2444af3bb07180550b646ad8f0d3ca78ddfb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 10 Dec 2020 18:49:43 +0300 Subject: Refresh on view appear --- Juick/ViewControllers/MessagesViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Juick/ViewControllers') diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index d25f438..536815c 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -25,6 +25,7 @@ NSString* const messageCellIdentifier = @"messageCell"; - (void)viewWillAppear:(BOOL)animated { self.navigationController.visibleViewController.title = self.title; + [self refreshData]; } -(void) refreshData { @@ -107,7 +108,6 @@ NSString* const messageCellIdentifier = @"messageCell"; } self.refreshControl = [UIRefreshControl new]; [self.refreshControl addTarget:self action:@selector(refreshData) forControlEvents:UIControlEventValueChanged]; - [self refreshData]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newMessage:) name:NewMessageNotificationName object:nil]; } -- cgit v1.2.3