Clean up ahead of PR.

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

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

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

Loading…
Cancel
Save