1. 同步Android 我的 tag UI
2. 其他优化
This commit is contained in:
@@ -195,7 +195,8 @@
|
||||
|
||||
[self.collectButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.settingButton);
|
||||
make.leading.equalTo(self.titleStackView.mas_trailing).mas_offset(5);
|
||||
make.trailing.mas_equalTo(-75);
|
||||
// make.trailing.equalTo(self.topicButton.mas_leading).mas_offset(-5);
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
}];
|
||||
|
||||
@@ -207,14 +208,14 @@
|
||||
[self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.settingButton);
|
||||
make.leading.equalTo(self.avatarView.mas_trailing).mas_offset(6);
|
||||
|
||||
make.trailing.mas_equalTo(self.collectButton.mas_leading);
|
||||
}];
|
||||
[self.titleStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_greaterThanOrEqualTo(50);
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_lessThanOrEqualTo(100);
|
||||
make.height.mas_equalTo(12);
|
||||
make.width.mas_lessThanOrEqualTo(150);
|
||||
// make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -222,7 +223,7 @@
|
||||
}];
|
||||
|
||||
[self.giftEffectImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(10,10));
|
||||
make.size.mas_equalTo(CGSizeMake(20,20));
|
||||
}];
|
||||
|
||||
[self.lockRoomImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -238,35 +239,34 @@
|
||||
}
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)onRoomEntered {
|
||||
[self handleRoomInfoChange:NO];
|
||||
}
|
||||
|
||||
- (void)onRoomUpdate {
|
||||
[self handleRoomInfoChange:YES];
|
||||
}
|
||||
|
||||
- (void)handleRoomInfoChange:(BOOL)isUpdate {
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo;
|
||||
self.idLabel.text = [NSString stringWithFormat:@"ID:%ld",(long)roomInfo.erbanNo];
|
||||
self.avatarView.imageUrl = roomInfo.avatar;
|
||||
if (roomInfo) {
|
||||
self.idLabel.text = [NSString stringWithFormat:@"ID:%ld",(long)roomInfo.erbanNo];
|
||||
self.avatarView.imageUrl = roomInfo.avatar;
|
||||
self.titleLabel.text = roomInfo.title;
|
||||
self.giftEffectImageView.hidden = roomInfo.hasAnimationEffect;
|
||||
if (roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
self.collectButton.hidden = YES;
|
||||
} else {
|
||||
self.collectButton.hidden = NO;
|
||||
self.collectButton.selected = roomInfo.isRoomFans;
|
||||
}
|
||||
if (!isUpdate) {
|
||||
self.collectButton.selected = roomInfo.isRoomFans; // 收藏后,房间数据没有及时更新到 room info,此时不需读 room info 状态
|
||||
}
|
||||
self.lockRoomImageView.hidden = roomInfo.roomPwd.length <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onRoomUpdate {
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo;
|
||||
self.titleLabel.text = roomInfo.title;
|
||||
self.avatarView.imageUrl = roomInfo.avatar;
|
||||
self.idLabel.text = [NSString stringWithFormat:@"ID:%ld",(long)roomInfo.erbanNo];
|
||||
self.giftEffectImageView.hidden = roomInfo.hasAnimationEffect;
|
||||
if (roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
self.collectButton.hidden = YES;
|
||||
} else {
|
||||
self.collectButton.hidden = NO;
|
||||
// self.collectButton.selected = roomInfo.isRoomFans; 收藏后,房间数据没有及时更新
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)showSharePanel {
|
||||
|
||||
@@ -537,13 +537,10 @@
|
||||
_onlineStackView.distribution = UIStackViewDistributionFill;
|
||||
_onlineStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_onlineStackView.spacing = 2;
|
||||
|
||||
}
|
||||
return _onlineStackView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (YYLabel *)idLabel {
|
||||
if (!_idLabel) {
|
||||
_idLabel = [[YYLabel alloc] init];
|
||||
|
Reference in New Issue
Block a user