Rename AttachmentStream methods.

pull/1/head
Matthew Chen 7 years ago
parent 498828f93c
commit 446ceb2b9c

@ -855,7 +855,7 @@ NS_ASSUME_NONNULL_BEGIN
< kMaxCachableSize;
stillImageView.image = [strongSelf tryToLoadCellMedia:^{
OWSCAssert([strongSelf.attachmentStream isImage]);
return strongSelf.attachmentStream.image;
return strongSelf.attachmentStream.originalImage;
}
mediaView:stillImageView
cacheKey:strongSelf.attachmentStream.uniqueId
@ -979,7 +979,7 @@ NS_ASSUME_NONNULL_BEGIN
stillImageView.image = [strongSelf tryToLoadCellMedia:^{
OWSCAssert([strongSelf.attachmentStream isVideo]);
return strongSelf.attachmentStream.image;
return strongSelf.attachmentStream.originalImage;
}
mediaView:stillImageView
cacheKey:strongSelf.attachmentStream.uniqueId

@ -73,7 +73,7 @@ NS_ASSUME_NONNULL_BEGIN
_galleryItemBox = galleryItemBox;
_viewItem = viewItem;
// We cache the image data in case the attachment stream is deleted.
_image = galleryItemBox.attachmentStream.image;
_image = galleryItemBox.attachmentStream.originalImage;
return self;
}

@ -43,7 +43,7 @@ public struct MediaGalleryItem: Equatable, Hashable {
}
var fullSizedImage: UIImage {
guard let image = attachmentStream.image() else {
guard let image = attachmentStream.originalImage() else {
owsFail("\(logTag) in \(#function) unexpectedly unable to build attachment image")
return UIImage()
}

@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
TSAttachmentStream *attachmentStream;
if ([attachment isKindOfClass:[TSAttachmentStream class]]) {
attachmentStream = (TSAttachmentStream *)attachment;
thumbnailImage = attachmentStream.image;
thumbnailImage = attachmentStream.originalImage;
}
} else if (attachmentInfo.thumbnailAttachmentPointerId) {
// download failed, or hasn't completed yet.

@ -191,7 +191,7 @@ NSString *const TSGroupThread_NotificationKey_UniqueId = @"TSGroupThread_Notific
OWSAssert(attachmentStream);
OWSAssert(transaction);
self.groupModel.groupImage = [attachmentStream image];
self.groupModel.groupImage = [attachmentStream originalImage];
[self saveWithTransaction:transaction];
[transaction addCompletionQueue:nil

@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) NSDate *creationTimestamp;
#if TARGET_OS_IPHONE
- (nullable UIImage *)image;
- (nullable UIImage *)originalImage;
- (nullable UIImage *)thumbnailImage;
- (nullable NSData *)thumbnailData;
- (nullable NSData *)validStillImageData;

@ -333,7 +333,7 @@ const CGFloat kMaxVideoStillSize = 1 * 1024;
#pragma mark -
- (nullable UIImage *)image
- (nullable UIImage *)originalImage
{
if ([self isVideo]) {
return [self videoStillImage];

Loading…
Cancel
Save