Merge branch 'charlesmchen/notificationSoundsVsConcurrency'

pull/1/head
Matthew Chen 9 years ago
commit f4a77f730f

@ -310,8 +310,8 @@
- (BOOL)shouldPlaySoundForNotification - (BOOL)shouldPlaySoundForNotification
{ {
OWSAssert([NSThread isMainThread]); @synchronized(self)
{
// Play no more than 2 notification sounds in a given // Play no more than 2 notification sounds in a given
// five-second window. // five-second window.
const CGFloat kNotificationWindowSeconds = 5.f; const CGFloat kNotificationWindowSeconds = 5.f;
@ -341,6 +341,7 @@
DDLogDebug(@"Skipping sound for notification"); DDLogDebug(@"Skipping sound for notification");
return NO; return NO;
} }
}
} }
#pragma mark - Util #pragma mark - Util

Loading…
Cancel
Save