summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/MessageCell.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index fb6e831..55e6054 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -32,15 +32,15 @@
self.message = msg;
self.avatar.image = nil;
__weak UIImageView *weakAvatar = self.avatar;
- [self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:msg.user.avatar]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
+ [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:msg.user.avatar] callback:^(NSData *data) {
[UIView transitionWithView:weakAvatar
duration:0.3
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
- weakAvatar.image = image;
+ weakAvatar.image = [UIImage imageWithData:data];
}
completion:nil];
- } failure:nil];
+ }];
if ([msg.attach length] > 0) {
CGFloat imageHeight = [msg.attachment.small.height floatValue] / [[UIScreen mainScreen] scale];
self.attachmentHeight.constant = imageHeight;