diff options
Diffstat (limited to 'Juick/Views/BubbleMessageCell.m')
-rw-r--r-- | Juick/Views/BubbleMessageCell.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Juick/Views/BubbleMessageCell.m b/Juick/Views/BubbleMessageCell.m index ce41002..f889200 100644 --- a/Juick/Views/BubbleMessageCell.m +++ b/Juick/Views/BubbleMessageCell.m @@ -7,6 +7,7 @@ // #import "BubbleMessageCell.h" +#import "APIClient.h" @implementation BubbleMessageCell @@ -30,15 +31,15 @@ self.message.text = message.text; self.unreadMarker.text = @""; __weak UIImageView *weakAvatar = self.avatarView; - [self.avatarView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:message.user.avatar]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:message.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]; + }]; } @end |