diff options
author | Vitaly Takmazov | 2019-10-31 16:16:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-05-12 16:38:25 +0300 |
commit | 9d78e7d654c51c22ce4be87efef5bc1f8d5a2d08 (patch) | |
tree | dfb028dfca07fdb7bbacc00771f9e865f28fd6d4 /Juick/Views/MessageCell.m | |
parent | 742e1a0e615a7e07a9f4b4c249227cd63839325f (diff) |
Fix authentication
Diffstat (limited to 'Juick/Views/MessageCell.m')
-rw-r--r-- | Juick/Views/MessageCell.m | 7 |
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) { |