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";
"Story.GroupCommentingRestrictedPlaceholder" = "Comments restricted";
"Story.GroupCommentingRestrictedPlaceholderAction" = "Boost to unlock";
"Story.GroupCommentingRestrictedPlaceholder" = "Comments restricted. Boost the group 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):
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(
content: AnyComponent(VStack([
AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(string: title, font: Font.regular(13.0), textColor: UIColor(rgb: 0xffffff, alpha: 0.3)))
))),
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)),
content: AnyComponent(MultilineTextComponent(
text: .plain(text),
maximumNumberOfLines: 0,
lineSpacing: 0.1
)),
effectAlignment: .center,
action: {
action()