Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

修改图片显示bug 详情看README #380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ChatKit-OC/ChatKit-OC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
5852033203B0746EE8645654 /* 📦 Copy Pods Resources */ = {
Expand Down
8 changes: 4 additions & 4 deletions ChatKit-OC/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PODS:
- AVOSCloudIM/_NOARC (= 8.2.0)
- AVOSCloudIM/_NOARC (8.2.0):
- AVOSCloud (= 8.2.0)
- ChatKit (2.0.3):
- ChatKit (2.1.0):
- AVOSCloud (~> 8.2.0)
- AVOSCloudIM (~> 8.2.0)
- CYLDeallocBlockExecutor (~> 1.1.2)
Expand Down Expand Up @@ -62,12 +62,12 @@ DEPENDENCIES:

EXTERNAL SOURCES:
ChatKit:
:path: ../
:path: "../"

SPEC CHECKSUMS:
AVOSCloud: c28318404ce474e722e09c8ac103fc58b2610074
AVOSCloudIM: 62c0d6307df41ce682f7cf11463254cc49318e24
ChatKit: 4ae53ec69e88025a529b7e7b5e95a2f68564e2e5
ChatKit: e0c626e492a9abba73b77462ac4570183a82e3ec
CYLDeallocBlockExecutor: ecf39e45dcead9e120f460df5668b8f5093d178e
CYLTabBarController: 8d99fccf22866fe18c978c5ff863dc6051da45ff
DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71
Expand All @@ -90,4 +90,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: d16020c2760c0b23c86274a3c4bed9aa620de53a

COCOAPODS: 1.3.1
COCOAPODS: 1.2.0
10 changes: 10 additions & 0 deletions ChatKit-OC/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 解决之前发送长方形图片接收之后cell高度显示不对的bug

# 解决图片在加载之后闪一下的bug

直线之后对比:

![before](http://oahmyhzk1.bkt.clouddn.com/2018-01-27-before.gif)

![afte](http://oahmyhzk1.bkt.clouddn.com/2018-01-27-after.gif)

Binary file added ChatKit-OC/after.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ChatKit-OC/before.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 24 additions & 12 deletions ChatKit/Class/Model/LCCKMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

@interface LCCKMessage : NSObject <NSCoding, NSCopying, LCCKMessageDelegate>

/// Width of the image in pixels.
@property(nonatomic, assign, readonly) int photoWidth;

/// Height of the image in pixels.
@property(nonatomic, assign, readonly) int photoHeight;


@property (nonatomic, copy, readonly) NSString *text;
@property (nonatomic, copy, readonly) NSString *systemText;
@property (nonatomic, strong, readwrite) UIImage *photo;
Expand Down Expand Up @@ -55,8 +62,8 @@
@property (nonatomic, copy, readonly) NSString *localDisplayName;

- (instancetype)initWithText:(NSString *)text
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
serverMessageId:(NSString *)serverMessageId;

Expand All @@ -69,6 +76,8 @@
* 初始化图片类型的消息
*
* @param photo 目标图片
* @param photoWidth 图片的实际宽度
* @param photoHeight 图片的实际高度
* @param photePath 目标图片的本地路径
* @param thumbnailURL 目标图片在服务器的缩略图地址
* @param originPhotoURL 目标图片在服务器的原图地址
Expand All @@ -78,11 +87,13 @@
* @return 返回Message model 对象
*/
- (instancetype)initWithPhoto:(UIImage *)photo
photoWidth:(uint)photoWidth
photoHeight:(uint)photoHeight
thumbnailPhoto:(UIImage *)thumbnailPhoto
photoPath:(NSString *)photoPath
thumbnailURL:(NSURL *)thumbnailURL
originPhotoURL:(NSURL *)originPhotoURL
senderId:(NSString *)senderId
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
serverMessageId:(NSString *)serverMessageId;
Expand All @@ -101,8 +112,8 @@
- (instancetype)initWithVideoConverPhoto:(UIImage *)videoConverPhoto
videoPath:(NSString *)videoPath
videoURL:(NSURL *)videoURL
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
serverMessageId:(NSString *)serverMessageId;

Expand All @@ -120,8 +131,8 @@
- (instancetype)initWithVoicePath:(NSString *)voicePath
voiceURL:(NSURL *)voiceURL
voiceDuration:(NSString *)voiceDuration
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
serverMessageId:(NSString *)serverMessageId;

Expand All @@ -140,20 +151,21 @@
- (instancetype)initWithVoicePath:(NSString *)voicePath
voiceURL:(NSURL *)voiceURL
voiceDuration:(NSString *)voiceDuration
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
hasRead:(BOOL)hasRead
hasRead:(BOOL)hasRead
serverMessageId:(NSString *)serverMessageId;

- (instancetype)initWithLocalPositionPhoto:(UIImage *)localPositionPhoto
geolocations:(NSString *)geolocations
location:(CLLocation *)location
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
senderId:(NSString *)senderId
sender:(id<LCCKUserDelegate>)sender
timestamp:(NSTimeInterval)timestamp
serverMessageId:(NSString *)serverMessageId;

+ (id)messageWithAVIMTypedMessage:(AVIMTypedMessage *)message;

@end

Loading