|
|
@ -5419,12 +5419,15 @@ typedef enum : NSUInteger {
|
|
|
|
}]) {
|
|
|
|
}]) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
__block TSInteraction *targetInteraction;
|
|
|
|
__block TSInteraction *targetInteraction;
|
|
|
|
[self.thread enumerateInteractionsUsingBlock:^(TSInteraction *interaction) {
|
|
|
|
[OWSPrimaryStorage.sharedManager.dbReadWriteConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
|
|
|
|
|
|
|
[self.thread enumerateInteractionsWithTransaction:transaction usingBlock:^(TSInteraction *interaction, YapDatabaseReadTransaction *t) {
|
|
|
|
if (interaction.timestamp == timestamp.unsignedLongLongValue) {
|
|
|
|
if (interaction.timestamp == timestamp.unsignedLongLongValue) {
|
|
|
|
targetInteraction = interaction;
|
|
|
|
targetInteraction = interaction;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
|
|
|
|
}];
|
|
|
|
if (targetInteraction == nil || targetInteraction.interactionType != OWSInteractionType_OutgoingMessage) { return; }
|
|
|
|
if (targetInteraction == nil || targetInteraction.interactionType != OWSInteractionType_OutgoingMessage) { return; }
|
|
|
|
NSString *hexEncodedPublicKey = targetInteraction.thread.contactIdentifier;
|
|
|
|
NSString *hexEncodedPublicKey = targetInteraction.thread.contactIdentifier;
|
|
|
|
if (hexEncodedPublicKey == nil) { return; }
|
|
|
|
if (hexEncodedPublicKey == nil) { return; }
|
|
|
@ -5434,7 +5437,6 @@ typedef enum : NSUInteger {
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
BOOL isSlaveDevice = ![masterHexEncodedPublicKey isEqual:hexEncodedPublicKey];
|
|
|
|
BOOL isSlaveDevice = ![masterHexEncodedPublicKey isEqual:hexEncodedPublicKey];
|
|
|
|
if (isSlaveDevice) { return; }
|
|
|
|
if (isSlaveDevice) { return; }
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
|
if (progress <= self.progressIndicatorView.progress) { return; }
|
|
|
|
if (progress <= self.progressIndicatorView.progress) { return; }
|
|
|
|
self.progressIndicatorView.alpha = 1;
|
|
|
|
self.progressIndicatorView.alpha = 1;
|
|
|
|
[self.progressIndicatorView setProgress:progress animated:YES];
|
|
|
|
[self.progressIndicatorView setProgress:progress animated:YES];
|
|
|
|