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]]) {
|
||||
[cell updateVoicePlayingState:YES];
|
||||
[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]]) {
|
||||
[cell updateVoicePlayingState:NO];
|
||||
// 禁用动画,避免 TableView 跳动
|
||||
[UIView performWithoutAnimation:^{
|
||||
[cell updateVoicePlayingState:NO];
|
||||
}];
|
||||
}
|
||||
self.playingCellIndexPath = nil;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user