File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ - (instancetype)init
2222- (void )setContent : (NSString *)content {
2323 if (_content != content) {
2424 _htmlMedia = [HtmlMedia htmlMediaWithString: content showType: MediaShowTypeCode];
25- if (_htmlMedia.contentDisplay .length <= 0 && _htmlMedia.imageItems .count <= 0 ) {
25+ if (_htmlMedia.contentDisplay .length <= 0 && _htmlMedia.imageItems .count <= 0 && !_nextImg ) {
2626 _content = @" " ;// 占位
2727 }else {
2828 _content = _htmlMedia.contentDisplay ;
@@ -35,12 +35,6 @@ - (BOOL)hasMedia{
3535
3636+ (instancetype )privateMessageWithObj : (id )obj andFriend : (User *)curFriend {
3737 PrivateMessage *nextMsg = [[PrivateMessage alloc ] init ];
38- nextMsg.sender = [Login curLoginUser ];
39- nextMsg.friend = curFriend;
40- nextMsg.sendStatus = PrivateMessageStatusSending;
41- nextMsg.created_at = [NSDate date ];
42- nextMsg.content = @" " ;
43- nextMsg.extra = @" " ;
4438 if ([obj isKindOfClass: [NSString class ]]) {
4539 nextMsg.content = obj;
4640 }else if ([obj isKindOfClass: [UIImage class ]]){
@@ -65,6 +59,12 @@ + (instancetype)privateMessageWithObj:(id)obj andFriend:(User *)curFriend{
6559 nextMsg.content = content;
6660 nextMsg.extra = extra;
6761 }
62+ nextMsg.sender = [Login curLoginUser ];
63+ nextMsg.friend = curFriend;
64+ nextMsg.sendStatus = PrivateMessageStatusSending;
65+ nextMsg.created_at = [NSDate date ];
66+ nextMsg.content = @" " ;
67+ nextMsg.extra = @" " ;
6868 return nextMsg;
6969};
7070
You can’t perform that action at this time.
0 commit comments