Skip to content

Commit

Permalink
fix: 修复文字回放错误展示问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
Hulk committed May 13, 2022
1 parent e675cce commit 7aedb11
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,14 @@ - (void)setTextModel:(PrismBehaviorTextModel *)textModel {
switch (_textModel.descType) {
case PrismBehaviorDescTypeNone:
{
self.contentLabel.text = @"[无法翻译]";
NSString *moduleText = _textModel.moduleText.length ? [NSString stringWithFormat:@"%@ - ", _textModel.moduleText] : @"";
NSString *elementName = _textModel.elementName.length ? [NSString stringWithFormat:@"%@", _textModel.elementName] : @"";
if (moduleText.length || elementName.length) {
self.contentLabel.text = [NSString stringWithFormat:@"%@%@%@", moduleText, _textModel.descContent ?: @"", elementName];
}
else {
self.contentLabel.text = @"[无法翻译]";
}
self.contentLabel.hidden = NO;
self.contentImageView.hidden = YES;
}
Expand Down

0 comments on commit 7aedb11

Please sign in to comment.