From 9d78e7d654c51c22ce4be87efef5bc1f8d5a2d08 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 31 Oct 2019 16:16:48 +0300 Subject: Fix authentication --- Juick/Views/MessageCell.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Juick/Views/MessageCell.m') 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) { -- cgit v1.2.3