修改了房间公屏话题非自己进房也显示的bug

This commit is contained in:
fengshuo
2022-03-15 16:05:47 +08:00
parent 069fc33c0c
commit 11e1c20fa0

View File

@@ -299,7 +299,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
}
}
NIMMessage * message = [[NIMMessage alloc] init];
message.text = @"可点击查看本房间公告";
message.localExt = @{@"isRoomTopic": @(YES)};
@@ -348,13 +347,13 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self addRoomMessage:message];
return;
} else {
[self createUserEnterRoomAddRoomtopicMessage];
[self addRoomMessage:message];
NIMChatroomNotificationMember *member = content.targets[0];
if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
if (!roomInfo.hasAnimationEffect) {
[self roomInfoNoGiftAnimationMessage:message];
}
[self createUserEnterRoomAddRoomtopicMessage];
}
}
} else if(content.eventType == NIMChatroomEventTypeInfoUpdated) {
@@ -441,7 +440,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
NSAttributedString* attr = [self.datasource objectAtIndex:indexPath.row];
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth, MAXFLOAT);
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth - 10, MAXFLOAT);
YYTextContainer *container = [YYTextContainer containerWithSize:maxSize];
container.maximumNumberOfRows = 0;
YYTextLayout *layout = [YYTextLayout layoutWithContainer:container text:attr];