From 76d8fad6a7c95b7e211afdcdcd267d6dcb2a5ef6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 15 Dec 2020 10:45:04 +0300 Subject: Revert "Refresh on view appear" This reverts commit aa6e2444af3bb07180550b646ad8f0d3ca78ddfb. --- Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata | 2 +- Juick/ViewControllers/MessagesViewController.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 919434a..7889985 100644 --- a/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:Juick.xcodeproj"> diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index 536815c..d25f438 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -25,7 +25,6 @@ NSString* const messageCellIdentifier = @"messageCell"; - (void)viewWillAppear:(BOOL)animated { self.navigationController.visibleViewController.title = self.title; - [self refreshData]; } -(void) refreshData { @@ -108,6 +107,7 @@ 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