Fix success handler not being called
This commit is contained in:
parent
8590e67271
commit
e71eb45642
|
@ -108,9 +108,11 @@ public final class AttachmentDownloadJob : NSObject, Job, NSCoding { // NSObject
|
|||
return handleFailure(error)
|
||||
}
|
||||
OWSFileSystem.deleteFile(temporaryFilePath.absoluteString)
|
||||
storage.write { transaction in
|
||||
storage.write(with: { transaction in
|
||||
storage.persist(stream, associatedWith: self.tsMessageID, using: transaction)
|
||||
}
|
||||
}, completion: {
|
||||
self.handleSuccess()
|
||||
})
|
||||
}.catch(on: DispatchQueue.global()) { error in
|
||||
handleFailure(error)
|
||||
}
|
||||
|
@ -138,9 +140,11 @@ public final class AttachmentDownloadJob : NSObject, Job, NSCoding { // NSObject
|
|||
return handleFailure(error)
|
||||
}
|
||||
OWSFileSystem.deleteFile(temporaryFilePath.absoluteString)
|
||||
storage.write { transaction in
|
||||
storage.write(with: { transaction in
|
||||
storage.persist(stream, associatedWith: self.tsMessageID, using: transaction)
|
||||
}
|
||||
}, completion: {
|
||||
self.handleSuccess()
|
||||
})
|
||||
}.catch(on: DispatchQueue.global()) { error in
|
||||
handleFailure(error)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue