|
|
|
@ -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
|
|
|
|
|