Minor refactoring

pull/229/head
nielsandriesse 5 years ago
parent 9213e2b770
commit 4b34a6624e

@ -1386,8 +1386,9 @@ static NSTimeInterval launchStartedAt;
{ {
if (self.poller == nil) { if (self.poller == nil) {
NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey; NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
if (userPublicKey == nil) { return; } if (userPublicKey != nil) {
self.poller = [[LKPoller alloc] init]; self.poller = [[LKPoller alloc] init];
}
} }
[self.poller startIfNeeded]; [self.poller startIfNeeded];
} }
@ -1398,8 +1399,9 @@ static NSTimeInterval launchStartedAt;
{ {
if (self.closedGroupPoller == nil) { if (self.closedGroupPoller == nil) {
NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey; NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
if (userPublicKey == nil) { return; } if (userPublicKey != nil) {
self.closedGroupPoller = [[LKClosedGroupPoller alloc] init]; self.closedGroupPoller = [[LKClosedGroupPoller alloc] init];
}
} }
[self.closedGroupPoller startIfNeeded]; [self.closedGroupPoller startIfNeeded];
} }

Loading…
Cancel
Save