mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge branch 'charlesmchen/singletonAssert'
This commit is contained in:
commit
eb68746b6d
|
@ -132,7 +132,7 @@ CHECKOUT OPTIONS:
|
|||
:commit: cbf2f47d59dd54d6d720fe787f835bd767443bb6
|
||||
:git: https://github.com/WhisperSystems/SignalProtocolKit.git
|
||||
SignalServiceKit:
|
||||
:commit: 8b5f82eb6d8393074987697cea6986b55fec800e
|
||||
:commit: e4ec7298441e82c8c5cd0678ea165dc3e12b2986
|
||||
:git: https://github.com/WhisperSystems/SignalServiceKit.git
|
||||
SocketRocket:
|
||||
:commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf
|
||||
|
|
|
@ -21,7 +21,7 @@ class CallNotificationsAdapter: NSObject {
|
|||
// if #available(iOS 10.0, *) {
|
||||
// adaptee = UserNotificationsAdaptee()
|
||||
// } else {
|
||||
adaptee = NotificationsManager()
|
||||
adaptee = Environment.getCurrent().notificationsManager
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ NSString *const OWSContactsManagerSignalRecipientsDidChangeNotification =
|
|||
_latestContactsById = @{};
|
||||
_avatarCache = [NSCache new];
|
||||
|
||||
OWSSingletonAssert();
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ static Environment *environment = nil;
|
|||
_networkManager = networkManager;
|
||||
_messageSender = messageSender;
|
||||
|
||||
OWSSingletonAssert();
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,14 @@
|
|||
|
||||
@interface NotificationsManager ()
|
||||
|
||||
@property SystemSoundID newMessageSound;
|
||||
@property (nonatomic) SystemSoundID newMessageSound;
|
||||
@property (nonatomic, readonly) NSMutableDictionary<NSString *, UILocalNotification *> *currentNotifications;
|
||||
@property (nonatomic, readonly) NotificationType notificationPreviewType;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation NotificationsManager
|
||||
|
||||
- (instancetype)init
|
||||
|
@ -37,6 +39,8 @@
|
|||
NSURL *newMessageURL = [[NSBundle mainBundle] URLForResource:@"NewMessage" withExtension:@"aifc"];
|
||||
AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageURL, &_newMessageSound);
|
||||
|
||||
OWSSingletonAssert();
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,18 @@ NSString *const PropertyListPreferencesKeyHasDeclinedNoContactsView = @"hasDecli
|
|||
|
||||
@implementation PropertyListPreferences
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
OWSSingletonAssert();
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Helpers
|
||||
|
||||
- (void)clear {
|
||||
|
|
|
@ -39,6 +39,8 @@ typedef void (^pushTokensSuccessBlock)(NSString *pushToken, NSString *voipToken)
|
|||
|
||||
@interface PushManager : NSObject <PKPushRegistryDelegate>
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
+ (PushManager *)sharedManager;
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,6 +77,8 @@
|
|||
_callBackgroundTask = UIBackgroundTaskInvalid;
|
||||
_currentNotifications = [NSMutableArray array];
|
||||
|
||||
OWSSingletonAssert();
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,8 @@
|
|||
-(instancetype)init {
|
||||
if (self = [super init]) {
|
||||
self.responseData = [NSMutableData data];
|
||||
|
||||
OWSSingletonAssert();
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue