1
This commit is contained in:
@@ -546,10 +546,12 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
|
||||
|
||||
self.playingCellIndexPath = indexPath;
|
||||
|
||||
// 更新 Cell 状态
|
||||
// 更新 Cell 状态,禁用动画避免 TableView 跳动
|
||||
KBChatAssistantMessageCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
|
||||
if ([cell isKindOfClass:[KBChatAssistantMessageCell class]]) {
|
||||
[UIView performWithoutAnimation:^{
|
||||
[cell updateVoicePlayingState:YES];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,7 +563,10 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
|
||||
if (self.playingCellIndexPath) {
|
||||
KBChatAssistantMessageCell *cell = [self.tableView cellForRowAtIndexPath:self.playingCellIndexPath];
|
||||
if ([cell isKindOfClass:[KBChatAssistantMessageCell class]]) {
|
||||
// 禁用动画,避免 TableView 跳动
|
||||
[UIView performWithoutAnimation:^{
|
||||
[cell updateVoicePlayingState:NO];
|
||||
}];
|
||||
}
|
||||
self.playingCellIndexPath = nil;
|
||||
}
|
||||
|
||||
@@ -200,12 +200,16 @@
|
||||
make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(8);
|
||||
make.left.equalTo(self.view).offset(16);
|
||||
make.right.equalTo(self.view).offset(-16);
|
||||
// 设置固定高度,避免内容变化导致布局跳动
|
||||
make.height.mas_equalTo(20); // 单行文本高度
|
||||
}];
|
||||
|
||||
[self.transcriptLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.statusLabel.mas_bottom).offset(8);
|
||||
make.left.equalTo(self.view).offset(16);
|
||||
make.right.equalTo(self.view).offset(-16);
|
||||
// 设置固定高度,避免内容变化导致布局跳动
|
||||
make.height.mas_equalTo(60); // 根据实际需要调整高度
|
||||
}];
|
||||
// 设置内容压缩阻力,避免被压缩
|
||||
[self.transcriptLabel setContentCompressionResistancePriority:UILayoutPriorityDefaultLow
|
||||
|
||||
Reference in New Issue
Block a user