From 8d6ce0b57c2d7de63d4e22f205ea87622432088e Mon Sep 17 00:00:00 2001 From: Frederic Jacobs Date: Tue, 22 Dec 2015 22:43:08 +0100 Subject: [PATCH] Notifications Protocol cleanup. --- src/Messages/TSMessagesManager.m | 10 ---------- src/Protocols/NotificationsProtocol.h | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Messages/TSMessagesManager.m b/src/Messages/TSMessagesManager.m index 8f947414e..647b86b41 100644 --- a/src/Messages/TSMessagesManager.m +++ b/src/Messages/TSMessagesManager.m @@ -8,7 +8,6 @@ #import "TSMessagesManager.h" -#import #import #import #import @@ -26,8 +25,6 @@ @interface TSMessagesManager () -@property SystemSoundID newMessageSound; - @end @implementation TSMessagesManager @@ -46,9 +43,6 @@ if (self) { _dbConnection = [TSStorageManager sharedManager].newDatabaseConnection; - NSURL *newMessageSound = - [NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"NewMessage" ofType:@"aifc"]]; - AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageSound, &_newMessageSound); } return self; @@ -453,8 +447,4 @@ return numberOfItems; } -- (void)dealloc { - AudioServicesDisposeSystemSoundID(_newMessageSound); -} - @end diff --git a/src/Protocols/NotificationsProtocol.h b/src/Protocols/NotificationsProtocol.h index 17b24032e..c37235eac 100644 --- a/src/Protocols/NotificationsProtocol.h +++ b/src/Protocols/NotificationsProtocol.h @@ -14,10 +14,10 @@ @protocol NotificationsProtocol -+ (void)notifyUserForIncomingMessage:(TSIncomingMessage *)incomingMessage +- (void)notifyUserForIncomingMessage:(TSIncomingMessage *)incomingMessage from:(NSString *)name inThread:(TSThread *)thread; -+ (void)notifyUserForErrorMessage:(TSErrorMessage *)error inThread:(TSThread *)thread; +- (void)notifyUserForErrorMessage:(TSErrorMessage *)error inThread:(TSThread *)thread; @end