Fixing graphical glitch in tread with images.
This commit is contained in:
parent
57f86008d1
commit
cd0fb8bc51
2
Podfile
2
Podfile
|
@ -18,6 +18,6 @@ pod 'SSKeychain'
|
|||
pod 'DJWActionSheet'
|
||||
|
||||
pod 'SocketRocket', :git => 'https://github.com/FredericJacobs/SocketRocket.git', :commit => 'f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => '5ac93a25e313eb3c84e396b2e704ff312410dc4e'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => 'e5582fef8a6b3e35f8070361ef37237222da712b'
|
||||
pod 'APDropDownNavToolbar', :git => 'https://github.com/corbett/APDropDownNavToolbar.git', :branch => 'master'
|
||||
pod 'UICKeyChainStore', :podspec => 'Podspecs/UICKeyChainStore.podspec'
|
||||
|
|
10
Podfile.lock
10
Podfile.lock
|
@ -34,7 +34,7 @@ PODS:
|
|||
- DJWActionSheet (1.0.4)
|
||||
- FFCircularProgressView (0.5)
|
||||
- HKDFKit (0.0.3)
|
||||
- JSQMessagesViewController (7.0.2):
|
||||
- JSQMessagesViewController (7.1.0):
|
||||
- JSQSystemSoundPlayer (~> 2.0.1)
|
||||
- JSQSystemSoundPlayer (2.0.1)
|
||||
- libPhoneNumber-iOS (0.8.4)
|
||||
|
@ -67,7 +67,7 @@ DEPENDENCIES:
|
|||
- DJWActionSheet
|
||||
- FFCircularProgressView (>= 0.1)
|
||||
- JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController`,
|
||||
commit `5ac93a25e313eb3c84e396b2e704ff312410dc4e`)
|
||||
commit `e5582fef8a6b3e35f8070361ef37237222da712b`)
|
||||
- libPhoneNumber-iOS (~> 0.8.2)
|
||||
- Mantle (~> 2.0)
|
||||
- OpenSSL (~> 1.0.201)
|
||||
|
@ -85,7 +85,7 @@ EXTERNAL SOURCES:
|
|||
:branch: master
|
||||
:git: https://github.com/corbett/APDropDownNavToolbar.git
|
||||
JSQMessagesViewController:
|
||||
:commit: 5ac93a25e313eb3c84e396b2e704ff312410dc4e
|
||||
:commit: e5582fef8a6b3e35f8070361ef37237222da712b
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b
|
||||
|
@ -98,7 +98,7 @@ CHECKOUT OPTIONS:
|
|||
:commit: 98a606b343c0ccc6cca1cd243b296325716f21e7
|
||||
:git: https://github.com/corbett/APDropDownNavToolbar.git
|
||||
JSQMessagesViewController:
|
||||
:commit: 5ac93a25e313eb3c84e396b2e704ff312410dc4e
|
||||
:commit: e5582fef8a6b3e35f8070361ef37237222da712b
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b
|
||||
|
@ -113,7 +113,7 @@ SPEC CHECKSUMS:
|
|||
DJWActionSheet: 2fe54b1298a7f0fe44462233752c76a530e0cd80
|
||||
FFCircularProgressView: 683a4ab1e1bd613246a3dffa61503ffdebcde8d8
|
||||
HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a
|
||||
JSQMessagesViewController: bb6649691182b1899dc52b42266ad69efc473510
|
||||
JSQMessagesViewController: ca11f86fa68ca70835f05e169df9244147c1dc40
|
||||
JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d
|
||||
libPhoneNumber-iOS: dbfc7b4128510a4955df3e5a6f125393fc9ebc2f
|
||||
Mantle: d7c75b6fb789b20f7ae30cd0d09435fe545896ff
|
||||
|
|
2
Pods
2
Pods
|
@ -1 +1 @@
|
|||
Subproject commit 1a61b75fb6611fd8b84ee86e6135bce9b4ea5c78
|
||||
Subproject commit bb09d25b82b2947868f8fdebe98b51f8ea7f4500
|
|
@ -352,7 +352,7 @@
|
|||
B6850E5A1995A4710068E715 /* whisperFake.cer in Resources */ = {isa = PBXBuildFile; fileRef = B6850E591995A4710068E715 /* whisperFake.cer */; };
|
||||
B692BF071A76EF0F002786DA /* TSDatabaseSecondaryIndexes.m in Sources */ = {isa = PBXBuildFile; fileRef = B692BF061A76EF0F002786DA /* TSDatabaseSecondaryIndexes.m */; };
|
||||
B69CD25119773E79005CE69A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69CD25019773E79005CE69A /* XCTest.framework */; };
|
||||
B6A3EB4B1A423B3800B2236B /* TSAttachmentAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A3EB4A1A423B3800B2236B /* TSAttachmentAdapter.m */; };
|
||||
B6A3EB4B1A423B3800B2236B /* TSPhotoAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A3EB4A1A423B3800B2236B /* TSPhotoAdapter.m */; };
|
||||
B6A5D05C1A7827ED0043D837 /* TSAvailablePreKeysCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A5D05B1A7827ED0043D837 /* TSAvailablePreKeysCountRequest.m */; };
|
||||
B6A5D0631A7850180043D837 /* TSCurrentSignedPreKeyRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A5D0621A7850180043D837 /* TSCurrentSignedPreKeyRequest.m */; };
|
||||
B6AE33BD1A1EB121003DF39D /* TSGroupModel.m in Sources */ = {isa = PBXBuildFile; fileRef = B6AE33BC1A1EB121003DF39D /* TSGroupModel.m */; };
|
||||
|
@ -989,8 +989,8 @@
|
|||
B69C2D1A1AA5447600A640C2 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = translations/ca.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
B69C2D1B1AA5448300A640C2 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = translations/cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
B69CD25019773E79005CE69A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
B6A3EB491A423B3800B2236B /* TSAttachmentAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAttachmentAdapter.h; sourceTree = "<group>"; };
|
||||
B6A3EB4A1A423B3800B2236B /* TSAttachmentAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAttachmentAdapter.m; sourceTree = "<group>"; };
|
||||
B6A3EB491A423B3800B2236B /* TSPhotoAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSPhotoAdapter.h; sourceTree = "<group>"; };
|
||||
B6A3EB4A1A423B3800B2236B /* TSPhotoAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSPhotoAdapter.m; sourceTree = "<group>"; };
|
||||
B6A5D05A1A7827ED0043D837 /* TSAvailablePreKeysCountRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAvailablePreKeysCountRequest.h; sourceTree = "<group>"; };
|
||||
B6A5D05B1A7827ED0043D837 /* TSAvailablePreKeysCountRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAvailablePreKeysCountRequest.m; sourceTree = "<group>"; };
|
||||
B6A5D0611A7850180043D837 /* TSCurrentSignedPreKeyRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSCurrentSignedPreKeyRequest.h; sourceTree = "<group>"; };
|
||||
|
@ -2099,8 +2099,8 @@
|
|||
children = (
|
||||
A5E9D4BA1A65FAD800E4481C /* TSVideoAttachmentAdapter.h */,
|
||||
A5E9D4B91A65FAD800E4481C /* TSVideoAttachmentAdapter.m */,
|
||||
B6A3EB491A423B3800B2236B /* TSAttachmentAdapter.h */,
|
||||
B6A3EB4A1A423B3800B2236B /* TSAttachmentAdapter.m */,
|
||||
B6A3EB491A423B3800B2236B /* TSPhotoAdapter.h */,
|
||||
B6A3EB4A1A423B3800B2236B /* TSPhotoAdapter.m */,
|
||||
B62D53F51A23CCAD009AAF82 /* TSMessageAdapter.h */,
|
||||
B62D53F61A23CCAD009AAF82 /* TSMessageAdapter.m */,
|
||||
);
|
||||
|
@ -3035,7 +3035,7 @@
|
|||
76EB063C18170B33006006FC /* NumberUtil.m in Sources */,
|
||||
B6B096691A1D25ED008BFAA6 /* TSThread.m in Sources */,
|
||||
B6B096641A1D25ED008BFAA6 /* TSContactThread.m in Sources */,
|
||||
B6A3EB4B1A423B3800B2236B /* TSAttachmentAdapter.m in Sources */,
|
||||
B6A3EB4B1A423B3800B2236B /* TSPhotoAdapter.m in Sources */,
|
||||
76EB063A18170B33006006FC /* FunctionalUtil.m in Sources */,
|
||||
76EB060A18170B33006006FC /* SignalUtil.m in Sources */,
|
||||
76EB062818170B33006006FC /* BadArgument.m in Sources */,
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#import "TSInvalidIdentityKeyErrorMessage.h"
|
||||
#import "TSIncomingMessage.h"
|
||||
#import "TSInteraction.h"
|
||||
#import "TSAttachmentAdapter.h"
|
||||
#import "TSPhotoAdapter.h"
|
||||
#import "TSAttachmentPointer.h"
|
||||
#import "TSVideoAttachmentAdapter.h"
|
||||
|
||||
|
@ -655,7 +655,7 @@ typedef enum : NSUInteger {
|
|||
if (!message.isMediaMessage) {
|
||||
cell.textView.textColor = [UIColor ows_blackColor];
|
||||
cell.textView.linkTextAttributes = @{ NSForegroundColorAttributeName : cell.textView.textColor,
|
||||
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle | NSUnderlinePatternSolid) };
|
||||
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle | NSUnderlinePatternSolid) };
|
||||
}
|
||||
|
||||
return cell;
|
||||
|
@ -839,8 +839,8 @@ typedef enum : NSUInteger {
|
|||
BOOL isMediaMessage = [messageItem isMediaMessage];
|
||||
|
||||
if (isMediaMessage) {
|
||||
if([[messageItem media] isKindOfClass:[TSAttachmentAdapter class]]) {
|
||||
TSAttachmentAdapter* messageMedia = (TSAttachmentAdapter*)[messageItem media];
|
||||
if([[messageItem media] isKindOfClass:[TSPhotoAdapter class]]) {
|
||||
TSPhotoAdapter* messageMedia = (TSPhotoAdapter*)[messageItem media];
|
||||
|
||||
if ([messageMedia isImage]) {
|
||||
tappedImage = ((UIImageView*)[messageMedia mediaView]).image;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "TSYapDatabaseObject.h"
|
||||
|
||||
#import "TSAttachmentAdapter.h"
|
||||
#import "TSPhotoAdapter.h"
|
||||
|
||||
|
||||
@interface TSGroupModel : TSYapDatabaseObject
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#import "TSErrorMessage.h"
|
||||
#import "TSattachment.h"
|
||||
#import "TSAttachmentStream.h"
|
||||
#import "TSAttachmentAdapter.h"
|
||||
#import "TSPhotoAdapter.h"
|
||||
#import "TSAttachmentPointer.h"
|
||||
#import "TSVideoAttachmentAdapter.h"
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
if ([attachment isKindOfClass:[TSAttachmentStream class]]) {
|
||||
TSAttachmentStream *stream = (TSAttachmentStream*)attachment;
|
||||
if ([stream isImage]) {
|
||||
adapter.mediaItem = [[TSAttachmentAdapter alloc] initWithAttachment:stream];
|
||||
adapter.mediaItem = [[TSPhotoAdapter alloc] initWithAttachment:stream];
|
||||
adapter.mediaItem.appliesMediaViewMaskAsOutgoing = [interaction isKindOfClass:[TSOutgoingMessage class]];
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <JSQMessagesViewController/JSQMediaItem.h>
|
||||
#import <JSQMessagesViewController/JSQPhotoMediaItem.h>
|
||||
#import "TSAttachmentStream.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface TSAttachmentAdapter : JSQMediaItem
|
||||
@interface TSPhotoAdapter : JSQPhotoMediaItem
|
||||
|
||||
- (instancetype)initWithAttachment:(TSAttachmentStream*)attachment;
|
||||
|
|
@ -6,25 +6,22 @@
|
|||
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TSAttachmentAdapter.h"
|
||||
#import "TSPhotoAdapter.h"
|
||||
|
||||
#import "UIDevice+TSHardwareVersion.h"
|
||||
#import "JSQMessagesMediaViewBubbleImageMasker.h"
|
||||
|
||||
@interface TSAttachmentAdapter ()
|
||||
|
||||
@property UIImage *image;
|
||||
@interface TSPhotoAdapter ()
|
||||
|
||||
@property (strong, nonatomic) UIImageView *cachedImageView;
|
||||
@end
|
||||
|
||||
@implementation TSAttachmentAdapter
|
||||
@implementation TSPhotoAdapter
|
||||
|
||||
- (instancetype)initWithAttachment:(TSAttachmentStream*)attachment{
|
||||
self = [super init];
|
||||
self = [super initWithImage:attachment.image];
|
||||
|
||||
if (self) {
|
||||
_image = attachment.image;
|
||||
_cachedImageView = nil;
|
||||
_attachmentId = attachment.uniqueId;
|
||||
|
||||
|
@ -34,7 +31,7 @@
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
_image = nil;
|
||||
self.image = nil;
|
||||
_cachedImageView = nil;
|
||||
}
|
||||
|
||||
|
@ -67,7 +64,7 @@
|
|||
|
||||
- (CGSize)mediaViewDisplaySize
|
||||
{
|
||||
return [self getBubbleSizeForImage:_image];
|
||||
return [self getBubbleSizeForImage:self.image];
|
||||
}
|
||||
|
||||
-(BOOL)isImage
|
Binary file not shown.
Loading…
Reference in New Issue