Various fixes

This commit is contained in:
Ilya Laktyushin 2023-11-27 01:05:35 +04:00
parent 2b85da9985
commit 9bed82655f
2 changed files with 10 additions and 5 deletions

View File

@ -310,7 +310,7 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
let (buttonTitleLayout, buttonTitleApply) = makeButtonTitleLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: buttonTitle, font: Font.semibold(15.0), textColor: primaryTextColor, paragraphAlignment: .center), backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: giftSize.width - 32.0, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
giftSize.height = titleLayout.size.height + subtitleLayout.size.height + 225.0
giftSize.height = titleLayout.size.height + textSpacing + subtitleLayout.size.height + 212.0
var labelRects = labelLayout.linesRects()
if labelRects.count > 1 {

View File

@ -1185,12 +1185,17 @@ final class PeerInfoHeaderNode: ASDisplayNode {
subtitleOffset = -effectiveAreaExpansionFraction * 5.0
panelSubtitleOffset = (1.0 - effectiveAreaExpansionFraction) * 5.0
} else {
if effectiveAreaExpansionFraction == 1.0 {
subtitleAlpha = 0.0
panelSubtitleAlpha = 1.0
} else {
if self.navigationTransition != nil {
subtitleAlpha = 1.0
panelSubtitleAlpha = 0.0
} else {
if effectiveAreaExpansionFraction == 1.0 {
subtitleAlpha = 0.0
panelSubtitleAlpha = 1.0
} else {
subtitleAlpha = 1.0
panelSubtitleAlpha = 0.0
}
}
}
}