Merge pull request #1264 from WhisperSystems/fix-audio-notification

Fix "message received" audio notification
pull/1/head
Michael Kirk 9 years ago committed by GitHub
commit b22eafc25a

@ -64,7 +64,7 @@
self.senderId,
self.senderDisplayName,
self.date,
self.errorMessageType];
(long)self.errorMessageType];
}
- (TSMessageAdapterType)messageType

@ -49,7 +49,7 @@
self.senderId,
self.senderDisplayName,
self.date,
self.infoMessageType];
(long)self.infoMessageType];
}
@end

@ -25,15 +25,17 @@
@implementation NotificationsManager
- (instancetype)init {
- (instancetype)init
{
self = [super init];
if (self) {
NSURL *newMessageSound =
[NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"NewMessage" ofType:@"aifc"]];
self.newMessageSound = AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageSound, &_newMessageSound);
if (!self) {
return self;
}
NSURL *newMessageURL = [[NSBundle mainBundle] URLForResource:@"NewMessage" withExtension:@"aifc"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageURL, &_newMessageSound);
return self;
}

@ -1583,7 +1583,7 @@ typedef enum : NSUInteger {
[self dismissViewControllerAnimated:YES
completion:^{
DDLogVerbose(@"Sending attachment. Size in bytes: %lu, contentType: %@",
attachmentData.length,
(unsigned long)attachmentData.length,
attachmentType);
[[TSMessagesManager sharedManager] sendAttachment:attachmentData

@ -56,7 +56,7 @@
break;
default:
DDLogWarn(@"Unknown Image Quality setting : %lu <%s>",
[Environment.preferences imageUploadQuality],
(unsigned long)[Environment.preferences imageUploadQuality],
__PRETTY_FUNCTION__);
break;
}

Loading…
Cancel
Save