|
|
|
@ -16,6 +16,8 @@
|
|
|
|
|
#import <SignalServiceKit/TextSecureKitEnv.h>
|
|
|
|
|
#import <SignalServiceKit/Threading.h>
|
|
|
|
|
|
|
|
|
|
NSString *const kNotificationsManagerNewMesssageSoundName = @"NewMessage.aifc";
|
|
|
|
|
|
|
|
|
|
@interface NotificationsManager ()
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) SystemSoundID newMessageSound;
|
|
|
|
@ -97,7 +99,7 @@
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if ([self shouldPlaySoundForNotification]) {
|
|
|
|
|
notification.soundName = @"NewMessage.aifc";
|
|
|
|
|
notification.soundName = kNotificationsManagerNewMesssageSoundName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NSString *alertMessage;
|
|
|
|
@ -136,7 +138,7 @@
|
|
|
|
|
Signal_Thread_UserInfo_Key : thread.uniqueId
|
|
|
|
|
};
|
|
|
|
|
if ([self shouldPlaySoundForNotification]) {
|
|
|
|
|
notification.soundName = @"NewMessage.aifc";
|
|
|
|
|
notification.soundName = kNotificationsManagerNewMesssageSoundName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NSString *alertMessage;
|
|
|
|
@ -176,7 +178,7 @@
|
|
|
|
|
Signal_Thread_UserInfo_Key : thread.uniqueId
|
|
|
|
|
};
|
|
|
|
|
if ([self shouldPlaySoundForNotification]) {
|
|
|
|
|
notification.soundName = @"NewMessage.aifc";
|
|
|
|
|
notification.soundName = kNotificationsManagerNewMesssageSoundName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NSString *alertMessage;
|
|
|
|
@ -219,7 +221,7 @@
|
|
|
|
|
UILocalNotification *notification = [[UILocalNotification alloc] init];
|
|
|
|
|
notification.userInfo = @{Signal_Thread_UserInfo_Key : thread.uniqueId};
|
|
|
|
|
if (shouldPlaySound) {
|
|
|
|
|
notification.soundName = @"NewMessage.aifc";
|
|
|
|
|
notification.soundName = kNotificationsManagerNewMesssageSoundName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NSString *alertBodyString = @"";
|
|
|
|
@ -268,7 +270,7 @@
|
|
|
|
|
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && messageDescription) {
|
|
|
|
|
UILocalNotification *notification = [[UILocalNotification alloc] init];
|
|
|
|
|
if (shouldPlaySound) {
|
|
|
|
|
notification.soundName = @"NewMessage.aifc";
|
|
|
|
|
notification.soundName = kNotificationsManagerNewMesssageSoundName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (self.notificationPreviewType) {
|
|
|
|
|