mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Restart timer animation when returning from background
// FREEBIE
This commit is contained in:
parent
04f5c3ce22
commit
da82c01f6e
|
@ -305,6 +305,10 @@ typedef enum : NSUInteger {
|
||||||
selector:@selector(startReadTimer)
|
selector:@selector(startReadTimer)
|
||||||
name:UIApplicationWillEnterForegroundNotification
|
name:UIApplicationWillEnterForegroundNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(startExpirationTimerAnimations)
|
||||||
|
name:UIApplicationWillEnterForegroundNotification
|
||||||
|
object:nil];
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(cancelReadTimer)
|
selector:@selector(cancelReadTimer)
|
||||||
name:UIApplicationDidEnterBackgroundNotification
|
name:UIApplicationDidEnterBackgroundNotification
|
||||||
|
@ -349,8 +353,7 @@ typedef enum : NSUInteger {
|
||||||
[self.thread touch];
|
[self.thread touch];
|
||||||
|
|
||||||
// restart any animations that were stopped e.g. while inspecting the contact info screens.
|
// restart any animations that were stopped e.g. while inspecting the contact info screens.
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:OWSMessagesViewControllerDidAppearNotification
|
[self startExpirationTimerAnimations];
|
||||||
object:nil];
|
|
||||||
|
|
||||||
OWSDisappearingMessagesConfiguration *configuration =
|
OWSDisappearingMessagesConfiguration *configuration =
|
||||||
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:self.thread.uniqueId];
|
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:self.thread.uniqueId];
|
||||||
|
@ -437,6 +440,12 @@ typedef enum : NSUInteger {
|
||||||
[self saveDraft];
|
[self saveDraft];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)startExpirationTimerAnimations
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:OWSMessagesViewControllerDidAppearNotification
|
||||||
|
object:nil];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)viewDidDisappear:(BOOL)animated {
|
- (void)viewDidDisappear:(BOOL)animated {
|
||||||
[super viewDidDisappear:animated];
|
[super viewDidDisappear:animated];
|
||||||
self.inputToolbar.contentView.textView.editable = NO;
|
self.inputToolbar.contentView.textView.editable = NO;
|
||||||
|
|
Loading…
Reference in a new issue