超级礼物
This commit is contained in:
@@ -114,7 +114,6 @@
|
||||
XPMessageRemoteExtModel * model = [XPMessageRemoteExtModel modelWithJSON:message.remoteExt[message.from]];
|
||||
messageInfo.bubbleImageUrl = [self parseMessageBubble:message];
|
||||
int first = attachment.first;
|
||||
int second = attachment.second;
|
||||
if (first == CustomMessageType_Gift) {///单人送
|
||||
return [self createSendGiftAttribute:attachment sendInfo:model messageInfo:messageInfo];
|
||||
} else if(first == CustomMessageType_AllMicroSend) {///全麦送 多人送
|
||||
@@ -183,7 +182,10 @@
|
||||
return [self createGuardianPlanetAttribute:attachment messageInfo:messageInfo];
|
||||
}else if(first == CustomMessageType_General_Public_Screen){
|
||||
return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo];
|
||||
}else if(first == CustomMessageType_Super_Gift){
|
||||
return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -479,7 +481,9 @@
|
||||
if(subTextDic.allKeys.count > 0){
|
||||
NSString *subText = subTextDic[@"zh-CHT"] == nil ? subTextDic[subTextDic.allKeys.firstObject] : subTextDic[@"zh-CHT"];
|
||||
NSAttributedString *attText = [[NSAttributedString alloc]initWithString:subText attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:model.textColor]}];
|
||||
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attText];
|
||||
if ([attribute.string containsString:[NSString stringWithFormat:@"{%@}",model.key]]){
|
||||
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attText];
|
||||
}
|
||||
|
||||
@kWeakify(self)
|
||||
[attribute yy_setTextHighlightRange:[attribute.string rangeOfString:subText] color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@@ -494,7 +498,10 @@
|
||||
}else if ([model.type isEqualToString:@"IMAGE"]){
|
||||
NSMutableAttributedString *attImage = [self createUrlImageAttribute:model.image size:CGSizeMake(model.width, model.height)];
|
||||
[attImage appendAttributedString:[self createSapceAttribute:2]];
|
||||
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attImage];
|
||||
if ([attribute.string containsString:[NSString stringWithFormat:@"{%@}",model.key]]){
|
||||
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attImage];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
messageInfo.content = attribute;
|
||||
@@ -1042,6 +1049,8 @@
|
||||
if (giftInfo == nil) {
|
||||
giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:info.giftId];
|
||||
}
|
||||
|
||||
|
||||
///官方新用户
|
||||
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:sendInfo.defUser newUser:sendInfo.newUser fromSayHelloChannel:sendInfo.fromSayHelloChannel]];
|
||||
//nick
|
||||
|
Reference in New Issue
Block a user