diff --git a/xplan-ios/Main/Room/View/StageView/MicroView/Anchor/AnchorMicroView.m b/xplan-ios/Main/Room/View/StageView/MicroView/Anchor/AnchorMicroView.m index 1d832b80..35263482 100644 --- a/xplan-ios/Main/Room/View/StageView/MicroView/Anchor/AnchorMicroView.m +++ b/xplan-ios/Main/Room/View/StageView/MicroView/Anchor/AnchorMicroView.m @@ -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]; diff --git a/xplan-ios/Main/Room/View/StageView/MicroView/MicroView.m b/xplan-ios/Main/Room/View/StageView/MicroView/MicroView.m index 5a51f409..24766dd0 100644 --- a/xplan-ios/Main/Room/View/StageView/MicroView/MicroView.m +++ b/xplan-ios/Main/Room/View/StageView/MicroView/MicroView.m @@ -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]];