1. 同步Android 我的 tag UI

2. 其他优化
This commit is contained in:
eggmanQQQ
2024-07-22 19:29:12 +08:00
parent 5e00713960
commit 59db4366a6
61 changed files with 571 additions and 532 deletions

View File

@@ -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];