From c9bffd66f961c1296e10cbbda219cf2a4582c4b6 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 4 Mar 2024 18:41:22 +0400 Subject: [PATCH] Various fixes --- .../ChatSendMessageActionSheetControllerNode.swift | 10 +++++----- .../PremiumUI/Sources/BusinessPageComponent.swift | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/submodules/ChatSendMessageActionUI/Sources/ChatSendMessageActionSheetControllerNode.swift b/submodules/ChatSendMessageActionUI/Sources/ChatSendMessageActionSheetControllerNode.swift index ac9a4cb3cb..93563c76f3 100644 --- a/submodules/ChatSendMessageActionUI/Sources/ChatSendMessageActionSheetControllerNode.swift +++ b/submodules/ChatSendMessageActionUI/Sources/ChatSendMessageActionSheetControllerNode.swift @@ -519,7 +519,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, } var clipDelta = delta - if inputHeight.isZero || layout.isNonExclusive { + if inputHeight < 70.0 || layout.isNonExclusive { clipDelta -= self.contentContainerNode.frame.height + 16.0 } @@ -642,7 +642,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, } var clipDelta = delta - if inputHeight.isZero || layout.isNonExclusive { + if inputHeight < 70.0 || layout.isNonExclusive { clipDelta -= self.contentContainerNode.frame.height + 16.0 } @@ -714,7 +714,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, } else { contentOrigin = CGPoint(x: layout.size.width - sideInset - contentSize.width - layout.safeInsets.right, y: layout.size.height - 6.0 - insets.bottom - contentSize.height) } - if inputHeight > 0.0 && !layout.isNonExclusive && self.animateInputField { + if inputHeight > 70.0 && !layout.isNonExclusive && self.animateInputField { contentOrigin.y += menuHeightWithInset } contentOrigin.y = min(contentOrigin.y + contentOffset, layout.size.height - 6.0 - layout.intrinsicInsets.bottom - contentSize.height) @@ -728,7 +728,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, } var sendButtonFrame = CGRect(origin: CGPoint(x: layout.size.width - initialSendButtonFrame.width + 1.0 - UIScreenPixel - layout.safeInsets.right, y: layout.size.height - insets.bottom - initialSendButtonFrame.height), size: initialSendButtonFrame.size) - if (inputHeight.isZero || layout.isNonExclusive) && self.animateInputField { + if (inputHeight < 70.0 || layout.isNonExclusive) && self.animateInputField { sendButtonFrame.origin.y -= menuHeightWithInset } sendButtonFrame.origin.y = min(sendButtonFrame.origin.y + contentOffset, layout.size.height - layout.intrinsicInsets.bottom - initialSendButtonFrame.height) @@ -741,7 +741,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, let messageHeightAddition: CGFloat = max(0.0, 35.0 - messageFrame.size.height) - if inputHeight.isZero || layout.isNonExclusive { + if inputHeight < 70.0 || layout.isNonExclusive { messageFrame.origin.y += menuHeightWithInset } diff --git a/submodules/PremiumUI/Sources/BusinessPageComponent.swift b/submodules/PremiumUI/Sources/BusinessPageComponent.swift index 8740f125db..4a1be46cf0 100644 --- a/submodules/PremiumUI/Sources/BusinessPageComponent.swift +++ b/submodules/PremiumUI/Sources/BusinessPageComponent.swift @@ -70,7 +70,7 @@ private final class HeaderComponent: Component { transition: .immediate, component: AnyComponent( MultilineTextComponent( - text: .plain(NSAttributedString(string: component.strings.Premium_Business_Description, font: Font.regular(15.0), textColor: .black)), + text: .plain(NSAttributedString(string: component.strings.Premium_Business_Description, font: Font.regular(15.0), textColor: component.theme.list.itemPrimaryTextColor)), horizontalAlignment: .center, maximumNumberOfLines: 0, lineSpacing: 0.2