summaryrefslogtreecommitdiff
path: root/Juick/Views/MessageCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views/MessageCell.m')
-rw-r--r--Juick/Views/MessageCell.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index a64b7c3..ad1a3a3 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -7,7 +7,6 @@
//
#import "MessageCell.h"
-#import "APIClient.h"
#import "Entity.h"
#import "NSDate+TimeAgo.h"
@@ -50,7 +49,7 @@ const NSString *unreadMarker = @"●";
- (void) configureWithMessage:(Message *)msg {
self.avatar.image = nil;
__weak UIImageView *weakAvatar = self.avatar;
- [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:msg.user.avatar] callback:^(NSData *data) {
+ [[AppDelegate shared].api fetchImageWithURL:[NSURL URLWithString:msg.user.avatar] callback:^(NSData *data) {
[UIView transitionWithView:weakAvatar
duration:0.3
options:UIViewAnimationOptionTransitionCrossDissolve
@@ -67,7 +66,7 @@ const NSString *unreadMarker = @"●";
self.attachmentHeight.constant = imageHeight;
self.attachmentWidth.constant = imageWidth;
__weak UIImageView *weakAttach = self.attach;
- [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:msg.attachment.small.url] callback:^(NSData *data) {
+ [[AppDelegate shared].api fetchImageWithURL:[NSURL URLWithString:msg.attachment.small.url] callback:^(NSData *data) {
[UIView transitionWithView:weakAttach
duration:0.3
options:UIViewAnimationOptionTransitionCrossDissolve
@@ -82,7 +81,7 @@ const NSString *unreadMarker = @"●";
}
self.title.text = msg.user.uname;
- self.timestamp.text = [[[APIClient sharedClient].dateFormatter dateFromString:msg.timestamp] timeAgo];
+ self.timestamp.text = [[[AppDelegate shared].sharedDateFormatter dateFromString:msg.timestamp] timeAgo];
NSUInteger count = [msg.repliesCount unsignedIntegerValue];
if (count > 0) {
if ([msg.repliesBy length] > 0) {