Fix double creation of NotificationsManager singleton.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 8374ca149e
commit 5ff454fd90

@ -123,7 +123,7 @@ EXTERNAL SOURCES:
AxolotlKit: AxolotlKit:
:git: https://github.com/WhisperSystems/SignalProtocolKit.git :git: https://github.com/WhisperSystems/SignalProtocolKit.git
SignalServiceKit: SignalServiceKit:
:path: ../SignalServiceKit :path: "../SignalServiceKit"
SocketRocket: SocketRocket:
:git: https://github.com/facebook/SocketRocket.git :git: https://github.com/facebook/SocketRocket.git

@ -21,7 +21,7 @@ class CallNotificationsAdapter: NSObject {
// if #available(iOS 10.0, *) { // if #available(iOS 10.0, *) {
// adaptee = UserNotificationsAdaptee() // adaptee = UserNotificationsAdaptee()
// } else { // } else {
adaptee = NotificationsManager() adaptee = Environment.getCurrent().notificationsManager
// } // }
} }

@ -17,12 +17,14 @@
@interface NotificationsManager () @interface NotificationsManager ()
@property SystemSoundID newMessageSound; @property (nonatomic) SystemSoundID newMessageSound;
@property (nonatomic, readonly) NSMutableDictionary<NSString *, UILocalNotification *> *currentNotifications; @property (nonatomic, readonly) NSMutableDictionary<NSString *, UILocalNotification *> *currentNotifications;
@property (nonatomic, readonly) NotificationType notificationPreviewType; @property (nonatomic, readonly) NotificationType notificationPreviewType;
@end @end
#pragma mark -
@implementation NotificationsManager @implementation NotificationsManager
- (instancetype)init - (instancetype)init

Loading…
Cancel
Save