From 9bed82655fef3b35f683ceb5b62eb57c485f0022 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 27 Nov 2023 01:05:35 +0400 Subject: [PATCH] Various fixes --- .../Sources/ChatMessageGiftBubbleContentNode.swift | 2 +- .../PeerInfoScreen/Sources/PeerInfoHeaderNode.swift | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift index 435105c17a..5b25714ce7 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift @@ -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 { diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift index 6fc70332b1..9868c81e26 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift @@ -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 + } } } }