Various fixes

This commit is contained in:
Ilya Laktyushin
2024-02-12 19:15:42 -04:00
parent 77969650f8
commit e73247c065
2 changed files with 12 additions and 10 deletions

View File

@@ -11305,5 +11305,5 @@ Sorry for the inconvenience.";
"Attachment.BoostToUnlock" = "Boost to Unlock"; "Attachment.BoostToUnlock" = "Boost to Unlock";
"Story.GroupCommentingRestrictedPlaceholder" = "Comments restricted"; "Story.GroupCommentingRestrictedPlaceholder" = "Comments restricted. Boost the group to unlock.";
"Story.GroupCommentingRestrictedPlaceholderAction" = "Boost to unlock"; "Story.GroupCommentingRestrictedPlaceholderAction" = "Learn More...";

View File

@@ -1105,15 +1105,17 @@ public final class MessageInputPanelComponent: Component {
)) ))
case let .premiumRequired(title, subtitle, action), let .boostRequired(title, subtitle, action): case let .premiumRequired(title, subtitle, action), let .boostRequired(title, subtitle, action):
leftAlignment = true leftAlignment = true
let text = NSMutableAttributedString(attributedString: NSAttributedString())
text.append(NSAttributedString(string: "\(title) ", font: Font.regular(13.0), textColor: UIColor(rgb: 0xffffff, alpha: 0.3)))
text.append(NSAttributedString(string: subtitle, font: Font.regular(13.0), textColor: component.theme.list.itemAccentColor))
contents = AnyComponent(PlainButtonComponent( contents = AnyComponent(PlainButtonComponent(
content: AnyComponent(VStack([ content: AnyComponent(MultilineTextComponent(
AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent( text: .plain(text),
text: .plain(NSAttributedString(string: title, font: Font.regular(13.0), textColor: UIColor(rgb: 0xffffff, alpha: 0.3))) maximumNumberOfLines: 0,
))), lineSpacing: 0.1
AnyComponentWithIdentity(id: 1, component: AnyComponent(MultilineTextComponent( )),
text: .plain(NSAttributedString(string: subtitle, font: Font.regular(13.0), textColor: component.theme.list.itemAccentColor))
)))
], alignment: .left, spacing: 1.0)),
effectAlignment: .center, effectAlignment: .center,
action: { action: {
action() action()