Skip to content

Commit 9f5efde

Browse files
committed
Fix
1 parent 8dafa70 commit 9f5efde

File tree

1 file changed

+16
-29
lines changed

1 file changed

+16
-29
lines changed

submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -472,43 +472,30 @@ final class StarsTransactionsListPanelComponent: Component {
472472
)))
473473
)
474474
if let itemSubtitle {
475-
let subtitleComponent: AnyComponent<Empty>
475+
var items: [AnyComponentWithIdentity<Empty>] = []
476476
if let itemFile {
477-
subtitleComponent = AnyComponent(
478-
HStack([
479-
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(
480-
GiftAnimationComponent(
481-
context: component.context,
482-
theme: environment.theme,
483-
file: itemFile,
484-
still: true,
485-
size: CGSize(width: 20.0, height: 20.0)
486-
)
487-
)),
488-
AnyComponentWithIdentity(id: AnyHashable(1), component: AnyComponent(
489-
MultilineTextComponent(
490-
text: .plain(NSAttributedString(
491-
string: itemSubtitle,
492-
font: Font.regular(fontBaseDisplaySize * 16.0 / 17.0),
493-
textColor: environment.theme.list.itemPrimaryTextColor
494-
)
495-
)
496-
)))
497-
], spacing: 2.0)
498-
)
499-
} else {
500-
subtitleComponent = AnyComponent(MultilineTextComponent(
477+
items.append(AnyComponentWithIdentity(id: "icon", component: AnyComponent(
478+
GiftAnimationComponent(
479+
context: component.context,
480+
theme: environment.theme,
481+
file: itemFile,
482+
still: true,
483+
size: CGSize(width: 20.0, height: 20.0)
484+
)
485+
)))
486+
}
487+
items.append(AnyComponentWithIdentity(id: "title", component: AnyComponent(
488+
MultilineTextComponent(
501489
text: .plain(NSAttributedString(
502490
string: itemSubtitle,
503491
font: Font.regular(fontBaseDisplaySize * 16.0 / 17.0),
504492
textColor: environment.theme.list.itemPrimaryTextColor
505493
)),
506494
maximumNumberOfLines: 1
507-
))
508-
}
509-
495+
)
496+
)))
510497
titleComponents.append(
511-
AnyComponentWithIdentity(id: AnyHashable(1), component: subtitleComponent)
498+
AnyComponentWithIdentity(id: AnyHashable(1), component: AnyComponent(HStack(items, spacing: 2.0)))
512499
)
513500
}
514501
titleComponents.append(

0 commit comments

Comments
 (0)