Add blur hashes to outgoing attachments.

This commit is contained in:
Matthew Chen 2019-10-07 16:24:02 -03:00
parent e9952ddeec
commit fae0d44550

View File

@ -116,10 +116,10 @@ static const CGFloat kAttachmentUploadProgressTheta = 0.001f;
OWSAttachmentUploadV2 *upload = [OWSAttachmentUploadV2 new];
[[BlurHash ensureBlurHashForAttachmentStream:attachmentStream]
.thenInBackground(^{
[upload uploadAttachmentToService:attachmentStream
progressBlock:^(NSProgress *uploadProgress) {
[self fireNotificationWithProgress:uploadProgress.fractionCompleted];
}];
return [upload uploadAttachmentToService:attachmentStream
progressBlock:^(NSProgress *uploadProgress) {
[self fireNotificationWithProgress:uploadProgress.fractionCompleted];
}];
})
.thenInBackground(^{
[self.databaseStorage writeWithBlock:^(SDSAnyWriteTransaction *transaction) {