Allow notification sound check from any thread.

// FREEBIE
pull/1/head
Matthew Chen 7 years ago
parent e8a0cc08e6
commit bdfa435738

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

Loading…
Cancel
Save