summaryrefslogtreecommitdiff
path: root/Juick/Views/ConversationCell.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-03-26 15:23:50 +0300
committerGravatar Vitaly Takmazov2019-03-26 15:23:50 +0300
commit9129e92ec546499f23d6e807e3f514876eded012 (patch)
tree076231a400299e2100601479b960a46b70b86f58 /Juick/Views/ConversationCell.m
parenta58828eea45ab1169203cd369a8c2c1f4c32efaf (diff)
Stop using AFNetworking image loader
Diffstat (limited to 'Juick/Views/ConversationCell.m')
-rw-r--r--Juick/Views/ConversationCell.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m
index e4a000c..dd17963 100644
--- a/Juick/Views/ConversationCell.m
+++ b/Juick/Views/ConversationCell.m
@@ -7,6 +7,7 @@
//
#import "ConversationCell.h"
+#import "APIClient.h"
@implementation ConversationCell
@@ -16,15 +17,15 @@
self.lastMessage.text = chat.lastMessageText;
self.unreadMarker.hidden = true;
__weak UIImageView *weakAvatar = self.avatar;
- [self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:chat.avatar]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
+ [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:chat.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