summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-31 16:16:48 +0300
committerGravatar Vitaly Takmazov2020-05-12 16:38:25 +0300
commit9d78e7d654c51c22ce4be87efef5bc1f8d5a2d08 (patch)
treedfb028dfca07fdb7bbacc00771f9e865f28fd6d4 /Juick/Views
parent742e1a0e615a7e07a9f4b4c249227cd63839325f (diff)
Fix authentication
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/BubbleMessageCell.m3
-rw-r--r--Juick/Views/ContentLoadingCell.xib6
-rw-r--r--Juick/Views/ConversationCell.m3
-rw-r--r--Juick/Views/MessageCell.m7
-rw-r--r--Juick/Views/MessageInputView.xib6
5 files changed, 11 insertions, 14 deletions
diff --git a/Juick/Views/BubbleMessageCell.m b/Juick/Views/BubbleMessageCell.m
index 65d3c0c..a5131e6 100644
--- a/Juick/Views/BubbleMessageCell.m
+++ b/Juick/Views/BubbleMessageCell.m
@@ -7,7 +7,6 @@
//
#import "BubbleMessageCell.h"
-#import "APIClient.h"
@implementation BubbleMessageCell
@@ -31,7 +30,7 @@
self.message.text = message.text;
self.unreadMarker.text = @"";
__weak UIImageView *weakAvatar = self.avatarView;
- [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:message.user.avatar] callback:^(NSData *data) {
+ [[AppDelegate shared].api fetchImageWithURL:[NSURL URLWithString:message.user.avatar] callback:^(NSData *data) {
[UIView transitionWithView:weakAvatar
duration:0.3
options:UIViewAnimationOptionTransitionCrossDissolve
diff --git a/Juick/Views/ContentLoadingCell.xib b/Juick/Views/ContentLoadingCell.xib
index f7ca251..21c121b 100644
--- a/Juick/Views/ContentLoadingCell.xib
+++ b/Juick/Views/ContentLoadingCell.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -92,7 +92,7 @@
<color red="0.97254901960784312" green="0.97254901960784312" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="Title">
- <color red="0.0" green="0.40000000000000002" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <color red="0.23529411764705882" green="0.46666666666666667" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m
index dd17963..4c1e71c 100644
--- a/Juick/Views/ConversationCell.m
+++ b/Juick/Views/ConversationCell.m
@@ -7,7 +7,6 @@
//
#import "ConversationCell.h"
-#import "APIClient.h"
@implementation ConversationCell
@@ -17,7 +16,7 @@
self.lastMessage.text = chat.lastMessageText;
self.unreadMarker.hidden = true;
__weak UIImageView *weakAvatar = self.avatar;
- [[APIClient sharedClient] fetchImageWithURL:[NSURL URLWithString:chat.avatar] callback:^(NSData *data) {
+ [[AppDelegate shared].api fetchImageWithURL:[NSURL URLWithString:chat.avatar] callback:^(NSData *data) {
[UIView transitionWithView:weakAvatar
duration:0.3
options:UIViewAnimationOptionTransitionCrossDissolve
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) {
diff --git a/Juick/Views/MessageInputView.xib b/Juick/Views/MessageInputView.xib
index 876be37..e13beca 100644
--- a/Juick/Views/MessageInputView.xib
+++ b/Juick/Views/MessageInputView.xib
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -75,7 +75,7 @@
<color red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="Title">
- <color red="0.0" green="0.40000000000000002" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <color red="0.23529411764705882" green="0.46666666666666667" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>