Rework how the views observe socket state.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent 45b947dc04
commit d3fc5e4ab8

@ -16,6 +16,8 @@ extern NSString *const kNSNotificationName_IsCensorshipCircumventionActiveDidCha
@property (atomic, readonly) BOOL isCensorshipCircumventionActive;
@property (nonatomic, readonly) BOOL hasCensoredPhoneNumber;
+ (instancetype)sharedInstance;
- (instancetype)init NS_UNAVAILABLE;

@ -234,12 +234,16 @@ NSString *const kNSNotificationName_IsCensorshipCircumventionActiveDidChange =
- (void)registrationStateDidChange:(NSNotification *)notification
{
[self updateHasCensoredPhoneNumber];
dispatch_async(dispatch_get_main_queue(), ^{
[self updateHasCensoredPhoneNumber];
});
}
- (void)localNumberDidChange:(NSNotification *)notification
{
[self updateHasCensoredPhoneNumber];
dispatch_async(dispatch_get_main_queue(), ^{
[self updateHasCensoredPhoneNumber];
});
}
#pragma mark - Logging

Loading…
Cancel
Save