From da82c01f6e00486e002a3bedac930a5e63ff71dc Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Wed, 12 Oct 2016 15:18:27 -0400 Subject: [PATCH] Restart timer animation when returning from background // FREEBIE --- .../src/view controllers/MessagesViewController.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index b3db87061..8d15e9bd9 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -305,6 +305,10 @@ typedef enum : NSUInteger { selector:@selector(startReadTimer) name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(startExpirationTimerAnimations) + name:UIApplicationWillEnterForegroundNotification + object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cancelReadTimer) name:UIApplicationDidEnterBackgroundNotification @@ -349,8 +353,7 @@ typedef enum : NSUInteger { [self.thread touch]; // restart any animations that were stopped e.g. while inspecting the contact info screens. - [[NSNotificationCenter defaultCenter] postNotificationName:OWSMessagesViewControllerDidAppearNotification - object:nil]; + [self startExpirationTimerAnimations]; OWSDisappearingMessagesConfiguration *configuration = [OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:self.thread.uniqueId]; @@ -437,6 +440,12 @@ typedef enum : NSUInteger { [self saveDraft]; } +- (void)startExpirationTimerAnimations +{ + [[NSNotificationCenter defaultCenter] postNotificationName:OWSMessagesViewControllerDidAppearNotification + object:nil]; +} + - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; self.inputToolbar.contentView.textView.editable = NO;