Clean up ahead of PR.

pull/1/head
Matthew Chen 8 years ago
parent 7d3f79440f
commit 51cec20c50

@ -236,9 +236,8 @@ NS_ASSUME_NONNULL_BEGIN
return; return;
} }
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [TSStorageManager.protocolStoreDBConnection
[TSStorageManager.protocolStoreDBConnection readWriteWithBlock:^( asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
YapDatabaseReadWriteTransaction *_Nonnull transaction) {
@try { @try {
id<CipherMessage> cipherMessage = cipherMessageBlock(encryptedData); id<CipherMessage> cipherMessage = cipherMessageBlock(encryptedData);
SessionCipher *cipher = [[SessionCipher alloc] initWithSessionStore:storageManager SessionCipher *cipher = [[SessionCipher alloc] initWithSessionStore:storageManager
@ -260,7 +259,6 @@ NS_ASSUME_NONNULL_BEGIN
}); });
} }
}]; }];
});
} }
- (void)processException:(NSException *)exception envelope:(OWSSignalServiceProtosEnvelope *)envelope - (void)processException:(NSException *)exception envelope:(OWSSignalServiceProtosEnvelope *)envelope

@ -1105,7 +1105,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
} }
[TSStorageManager.protocolStoreDBConnection [TSStorageManager.protocolStoreDBConnection
readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) { asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
if (extraDevices.count < 1 && missingDevices.count < 1) { if (extraDevices.count < 1 && missingDevices.count < 1) {
OWSProdFail([OWSAnalyticsEvents messageSenderErrorNoMissingOrExtraDevices]); OWSProdFail([OWSAnalyticsEvents messageSenderErrorNoMissingOrExtraDevices]);
} }
@ -1436,7 +1436,8 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
return; return;
} }
[TSStorageManager.protocolStoreDBConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [TSStorageManager.protocolStoreDBConnection asyncReadWriteWithBlock:^(
YapDatabaseReadWriteTransaction *transaction) {
for (NSUInteger i = 0; i < [devices count]; i++) { for (NSUInteger i = 0; i < [devices count]; i++) {
int deviceNumber = [devices[i] intValue]; int deviceNumber = [devices[i] intValue];
[[TSStorageManager sharedManager] deleteSessionForContact:identifier [[TSStorageManager sharedManager] deleteSessionForContact:identifier

Loading…
Cancel
Save