|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
#import "NSTimer+OWS.h"
|
|
|
|
|
#import "NotificationsProtocol.h"
|
|
|
|
|
#import "OWSBackgroundTask.h"
|
|
|
|
|
#import "OWSDevicesService.h"
|
|
|
|
|
#import "OWSError.h"
|
|
|
|
|
#import "OWSMessageManager.h"
|
|
|
|
|
#import "OWSMessageReceiver.h"
|
|
|
|
@ -297,6 +298,10 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
|
|
|
|
|
selector:@selector(isCensorshipCircumventionActiveDidChange:)
|
|
|
|
|
name:kNSNotificationName_IsCensorshipCircumventionActiveDidChange
|
|
|
|
|
object:nil];
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
|
selector:@selector(deviceListUpdateModifiedDeviceList:)
|
|
|
|
|
name:NSNotificationName_DeviceListUpdateModifiedDeviceList
|
|
|
|
|
object:nil];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#pragma mark - Manage Socket
|
|
|
|
@ -1134,6 +1139,15 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
|
|
|
|
|
[self applyDesiredSocketState];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)deviceListUpdateModifiedDeviceList:(NSNotification *)notification
|
|
|
|
|
{
|
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
|
|
|
|
|
|
if (self.webSocketType == OWSWebSocketTypeDefault) {
|
|
|
|
|
[self cycleSocket];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
|