Remove unused TSAttachment initializer

This commit is contained in:
Sasha Weiss 2024-06-14 14:30:02 -07:00 committed by GitHub
parent 9396eae21d
commit 98f7cccac0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 0 additions and 54 deletions

View File

@ -95,14 +95,6 @@ typedef NS_CLOSED_ENUM(NSUInteger, TSAnimatedMimeType) {
uploadTimestamp:(unsigned long long)uploadTimestamp
videoDuration:(nullable NSNumber *)videoDuration NS_DESIGNATED_INITIALIZER;
// This constructor is used for new instances of TSAttachmentPointer,
// i.e. undownloaded restoring attachments.
- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId
contentType:(NSString *)contentType
sourceFilename:(nullable NSString *)sourceFilename
caption:(nullable NSString *)caption
albumMessageId:(nullable NSString *)albumMessageId NS_DESIGNATED_INITIALIZER;
// This constructor is used for new instances of TSAttachmentStream
// that represent new, un-uploaded outgoing attachments.
- (instancetype)initAttachmentWithContentType:(NSString *)contentType

View File

@ -86,40 +86,6 @@ NSUInteger const TSAttachmentSchemaVersion = 1;
return self;
}
// This constructor is used for new instances of TSAttachmentPointer,
// i.e. undownloaded restoring attachments.
- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId
contentType:(NSString *)contentType
sourceFilename:(nullable NSString *)sourceFilename
caption:(nullable NSString *)caption
albumMessageId:(nullable NSString *)albumMessageId
{
OWSAssertDebug(uniqueId.length > 0);
if (contentType.length < 1) {
OWSLogWarn(@"incoming attachment has invalid content type");
contentType = MimeTypeUtil.mimeTypeApplicationOctetStream;
}
OWSAssertDebug(contentType.length > 0);
// If saved, this AttachmentPointer would replace the AttachmentStream in the attachments collection.
// However we only use this AttachmentPointer should only be used during the export process so it
// won't be saved until we restore the backup (when there will be no AttachmentStream to replace).
self = [super initWithUniqueId:uniqueId];
if (!self) {
return self;
}
_contentType = contentType;
_sourceFilename = sourceFilename;
_caption = caption;
_albumMessageId = albumMessageId;
_attachmentSchemaVersion = TSAttachmentSchemaVersion;
return self;
}
// This constructor is used for new instances of TSAttachmentStream
// that represent new, un-uploaded outgoing attachments.
- (instancetype)initAttachmentWithContentType:(NSString *)contentType

View File

@ -59,12 +59,6 @@ NSString *NSStringForTSAttachmentPointerState(TSAttachmentPointerState value);
uploadTimestamp:(unsigned long long)uploadTimestamp
videoDuration:(nullable NSNumber *)videoDuration NS_UNAVAILABLE;
- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId
contentType:(NSString *)contentType
sourceFilename:(nullable NSString *)sourceFilename
caption:(nullable NSString *)caption
albumMessageId:(nullable NSString *)albumMessageId NS_UNAVAILABLE;
- (instancetype)initAttachmentWithContentType:(NSString *)contentType
byteCount:(UInt32)byteCount
sourceFilename:(nullable NSString *)sourceFilename

View File

@ -44,12 +44,6 @@ NSString *NSStringForAttachmentThumbnailQuality(TSAttachmentThumbnailQuality val
uploadTimestamp:(unsigned long long)uploadTimestamp
videoDuration:(nullable NSNumber *)videoDuration NS_UNAVAILABLE;
- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId
contentType:(NSString *)contentType
sourceFilename:(nullable NSString *)sourceFilename
caption:(nullable NSString *)caption
albumMessageId:(nullable NSString *)albumMessageId NS_UNAVAILABLE;
- (instancetype)initAttachmentWithContentType:(NSString *)contentType
byteCount:(UInt32)byteCount
sourceFilename:(nullable NSString *)sourceFilename