summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/Supporting Files/Juick-Info.plist2
-rw-r--r--Juick/Views/BubbleMessageCell.m13
-rw-r--r--Juick/Views/ConversationCell.m13
-rw-r--r--Juick/Views/MessageCell.m24
4 files changed, 44 insertions, 8 deletions
diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist
index 002d172..d42d202 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>68</string>
+ <string>69</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
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;
diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m
index 750ab45..780e74a 100644
--- a/Juick/Views/ConversationCell.m
+++ b/Juick/Views/ConversationCell.m
@@ -7,7 +7,7 @@
//
#import "ConversationCell.h"
-@import YYWebImage;
+@import AFNetworking;
@implementation ConversationCell
@@ -20,7 +20,16 @@
self.chatName.text = chat.uname;
self.lastMessage.text = @"";
self.unreadMarker.text = @"";
- [self.avatar yy_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.uid intValue]]] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation];
+ __weak UIImageView *weakAvatar;
+ [self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.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];
}
@end
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index c304f37..4b08190 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -13,7 +13,7 @@
@import DateTools;
@import MWFeedParser;
-@import YYWebImage;
+@import AFNetworking;
@implementation MessageCell
@@ -35,11 +35,29 @@
}
- (void) configureWithMessage:(Message *)msg {
- [self.avatar yy_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [msg.user.uid intValue]]] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation];
+ __weak UIImageView *weakAvatar = self.avatar;
+ [self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [msg.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];
if ([msg.attach length] > 0) {
CGFloat imageHeight = [msg.attachment.small.height floatValue] / [[UIScreen mainScreen] scale];
self.attachmentHeight.constant = imageHeight;
- [self.attach yy_setImageWithURL:[NSURL URLWithString:msg.attach] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation];
+ __weak UIImageView *weakAttach = self.attach;
+ [self.attach setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:msg.attach]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
+ [UIView transitionWithView:weakAttach
+ duration:0.3
+ options:UIViewAnimationOptionTransitionCrossDissolve
+ animations:^{
+ weakAttach.image = image;
+ }
+ completion:nil];
+ } failure:nil];
} else {
self.attachmentHeight.constant = 0;
self.attach.image = nil;