|
|
|
@ -32,6 +32,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f;
|
|
|
|
|
@interface OWSAttachmentsProcessor ()
|
|
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) TSNetworkManager *networkManager;
|
|
|
|
|
@property (nonatomic, readonly) TSStorageManager *storageManager;
|
|
|
|
|
@property (nonatomic, readonly) NSArray<TSAttachmentPointer *> *supportedAttachmentPointers;
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
@ -40,6 +41,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f;
|
|
|
|
|
|
|
|
|
|
- (instancetype)initWithAttachmentPointer:(TSAttachmentPointer *)attachmentPointer
|
|
|
|
|
networkManager:(TSNetworkManager *)networkManager
|
|
|
|
|
storageManager:(TSStorageManager *)storageManager
|
|
|
|
|
{
|
|
|
|
|
self = [super init];
|
|
|
|
|
if (!self) {
|
|
|
|
@ -47,6 +49,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_networkManager = networkManager;
|
|
|
|
|
_storageManager = storageManager;
|
|
|
|
|
|
|
|
|
|
_supportedAttachmentPointers = @[ attachmentPointer ];
|
|
|
|
|
_supportedAttachmentIds = @[ attachmentPointer.uniqueId ];
|
|
|
|
@ -59,6 +62,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f;
|
|
|
|
|
relay:(nullable NSString *)relay
|
|
|
|
|
thread:(TSThread *)thread
|
|
|
|
|
networkManager:(TSNetworkManager *)networkManager
|
|
|
|
|
storageManager:(TSStorageManager *)storageManager
|
|
|
|
|
transaction:(YapDatabaseReadWriteTransaction *)transaction
|
|
|
|
|
{
|
|
|
|
|
self = [super init];
|
|
|
|
@ -67,6 +71,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_networkManager = networkManager;
|
|
|
|
|
_storageManager = storageManager;
|
|
|
|
|
|
|
|
|
|
NSMutableArray<NSString *> *attachmentIds = [NSMutableArray new];
|
|
|
|
|
NSMutableArray<TSAttachmentPointer *> *supportedAttachmentPointers = [NSMutableArray new];
|
|
|
|
|