|
|
@ -585,6 +585,7 @@ typedef enum : NSUInteger {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self.voiceMemoUpdateTimer invalidate];
|
|
|
|
self.voiceMemoUpdateTimer = [NSTimer weakScheduledTimerWithTimeInterval:0.1f
|
|
|
|
self.voiceMemoUpdateTimer = [NSTimer weakScheduledTimerWithTimeInterval:0.1f
|
|
|
|
target:self
|
|
|
|
target:self
|
|
|
|
selector:@selector(updateVoiceMemo)
|
|
|
|
selector:@selector(updateVoiceMemo)
|
|
|
@ -971,6 +972,10 @@ typedef enum : NSUInteger {
|
|
|
|
selector:@selector(applicationWillEnterForeground:)
|
|
|
|
selector:@selector(applicationWillEnterForeground:)
|
|
|
|
name:UIApplicationWillEnterForegroundNotification
|
|
|
|
name:UIApplicationWillEnterForegroundNotification
|
|
|
|
object:nil];
|
|
|
|
object:nil];
|
|
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
|
|
|
|
selector:@selector(applicationDidEnterBackground:)
|
|
|
|
|
|
|
|
name:UIApplicationDidEnterBackgroundNotification
|
|
|
|
|
|
|
|
object:nil];
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
selector:@selector(applicationWillResignActive:)
|
|
|
|
selector:@selector(applicationWillResignActive:)
|
|
|
|
name:UIApplicationWillResignActiveNotification
|
|
|
|
name:UIApplicationWillResignActiveNotification
|
|
|
@ -1006,6 +1011,16 @@ typedef enum : NSUInteger {
|
|
|
|
[self ensureThreadOffersAndIndicators];
|
|
|
|
[self ensureThreadOffersAndIndicators];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidEnterBackground:(NSNotification *)notification
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// self.hasEnteredBackground = YES;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (self.hasClearedUnreadMessagesIndicator) {
|
|
|
|
|
|
|
|
self.hasClearedUnreadMessagesIndicator = NO;
|
|
|
|
|
|
|
|
self.offersAndIndicators = nil;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillResignActive:(NSNotification *)notification
|
|
|
|
- (void)applicationWillResignActive:(NSNotification *)notification
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[self cancelVoiceMemo];
|
|
|
|
[self cancelVoiceMemo];
|
|
|
@ -1279,7 +1294,8 @@ typedef enum : NSUInteger {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)startReadTimer {
|
|
|
|
- (void)startReadTimer {
|
|
|
|
self.readTimer = [NSTimer scheduledTimerWithTimeInterval:1
|
|
|
|
[self.readTimer invalidate];
|
|
|
|
|
|
|
|
self.readTimer = [NSTimer weakScheduledTimerWithTimeInterval:2
|
|
|
|
target:self
|
|
|
|
target:self
|
|
|
|
selector:@selector(readTimerDidFire)
|
|
|
|
selector:@selector(readTimerDidFire)
|
|
|
|
userInfo:nil
|
|
|
|
userInfo:nil
|
|
|
@ -2972,8 +2988,12 @@ typedef enum : NSUInteger {
|
|
|
|
// make sure we don't show it again.
|
|
|
|
// make sure we don't show it again.
|
|
|
|
self.hasClearedUnreadMessagesIndicator = YES;
|
|
|
|
self.hasClearedUnreadMessagesIndicator = YES;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (self.offersAndIndicators.unreadIndicatorPosition) {
|
|
|
|
|
|
|
|
// If we've just cleared the "unread messages" indicator,
|
|
|
|
|
|
|
|
// update the dynamic interactions.
|
|
|
|
[self ensureThreadOffersAndIndicators];
|
|
|
|
[self ensureThreadOffersAndIndicators];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#pragma mark - Attachment Picking: Documents
|
|
|
|
#pragma mark - Attachment Picking: Documents
|
|
|
|
|
|
|
|
|
|
|
|