个播房房主昵称不截取5位
This commit is contained in:
@@ -60,7 +60,6 @@
|
||||
self.postionLabel.hidden = YES;
|
||||
///更新离开模式蒙层
|
||||
if (position == -1) {
|
||||
self.nickLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold];
|
||||
if (userInfo) {
|
||||
if ([self.subviews containsObject:self.leaveLabel]) {
|
||||
[self.leaveLabel removeFromSuperview];
|
||||
@@ -109,6 +108,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)configUser:(UserInfoModel *)userInfo {
|
||||
[super configUser:userInfo];
|
||||
if (self.position == -1) {///房主不需要截取昵称的5个字符
|
||||
self.nickLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold];
|
||||
self.nickLabel.text = userInfo.nick;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)userSpeaking {
|
||||
if (self.position != -1) {
|
||||
[self.animationView startWaveAnimation];
|
||||
|
@@ -187,10 +187,11 @@
|
||||
} else if(userInfo.gender == GenderType_Female){
|
||||
[self.postionLabel setBackgroundColor:[ThemeColor positionFemaleNickBackColor]];
|
||||
}
|
||||
NSString *nickStr = userInfo.nick;
|
||||
if (userInfo.nick.length > 5) {
|
||||
userInfo.nick = [NSString stringWithFormat:@"%@…", [userInfo.nick substringToIndex:5]];
|
||||
nickStr = [NSString stringWithFormat:@"%@…", [userInfo.nick substringToIndex:5]];
|
||||
}
|
||||
self.nickLabel.text = userInfo.nick.length > 0 ? userInfo.nick : @"";
|
||||
self.nickLabel.text = nickStr.length > 0 ? nickStr : @"";
|
||||
} else {
|
||||
self.avatarImageView.image = nil;
|
||||
[self.postionLabel setBackgroundColor:[ThemeColor positionNormalNickBackColor]];
|
||||
|
Reference in New Issue
Block a user