summaryrefslogtreecommitdiff
path: root/Juick/Views/BubbleMessageCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views/BubbleMessageCell.m')
-rw-r--r--Juick/Views/BubbleMessageCell.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Juick/Views/BubbleMessageCell.m b/Juick/Views/BubbleMessageCell.m
index b201664..33a4206 100644
--- a/Juick/Views/BubbleMessageCell.m
+++ b/Juick/Views/BubbleMessageCell.m
@@ -8,7 +8,7 @@
#import "BubbleMessageCell.h"
#import "ColorScheme.h"
-@import YYWebImage;
+@import AFNetworking;
@implementation BubbleMessageCell
@@ -27,7 +27,16 @@
self.name.text = message.user.uname;
self.message.text = message.text;
self.unreadMarker.text = @"";
- [self.avatarView yy_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [message.user.uid intValue]]] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation];
+ __weak UIImageView *weakAvatar = self.avatarView;
+ [self.avatarView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [message.user.uid intValue]]]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
+ [UIView transitionWithView:weakAvatar
+ duration:0.3
+ options:UIViewAnimationOptionTransitionCrossDissolve
+ animations:^{
+ weakAvatar.image = image;
+ }
+ completion:nil];
+ } failure:nil];
self.message.enabledTextCheckingTypes = NSTextCheckingTypeLink;
self.message.backgroundColor = [ColorScheme mainBackground];
self.message.layer.cornerRadius = 4;