Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #260 from matrix-org/riot_1121
Browse files Browse the repository at this point in the history
Bug Fix - Chat screen: image thumbnails management is broken
  • Loading branch information
giomfo authored Mar 22, 2017
2 parents 4f2306b + 120e1e4 commit 71b9fa8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MatrixKit/Models/Room/MXKAttachment.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ - (instancetype)initWithEvent:(MXEvent *)mxEvent andMatrixSession:(MXSession*)mx

thumbnailFile = _contentInfo[@"thumbnail_file"];

_thumbnailURL = [self getThumbnailUrlForSize:CGSizeMake(kThumbnailWidth, kThumbnailHeight)];
_thumbnailMimeType = [self getThumbnailMimeType];

contentFile = eventContent[@"file"];

// Retrieve the content url by taking into account the potential encryption.
Expand Down Expand Up @@ -155,6 +152,10 @@ - (instancetype)initWithEvent:(MXEvent *)mxEvent andMatrixSession:(MXSession*)mx
}

_cacheFilePath = [MXMediaManager cachePathForMediaWithURL:_actualURL andType:mimetype inFolder:_eventRoomId];

// Deduce the thumbnail information from the retrieved data.
_thumbnailURL = [self getThumbnailUrlForSize:CGSizeMake(kThumbnailWidth, kThumbnailHeight)];
_thumbnailMimeType = [self getThumbnailMimeType];
}
return self;
}
Expand Down

0 comments on commit 71b9fa8

Please sign in to comment.