From 6360ac9b6833b31cccf1ca34861a199a38d6c4c2 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 13 Jul 2021 20:46:05 +0200 Subject: [PATCH] Fix media selection panel background --- .../TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 9e128efd5f..d2bf44a3e6 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -347,7 +347,7 @@ final class PeerInfoSelectionPanelNode: ASDisplayNode { let selectionPanel: ChatMessageSelectionInputPanelNode let separatorNode: ASDisplayNode - let backgroundNode: ASDisplayNode + let backgroundNode: NavigationBackgroundNode init(context: AccountContext, peerId: PeerId, deleteMessages: @escaping () -> Void, shareMessages: @escaping () -> Void, forwardMessages: @escaping () -> Void, reportMessages: @escaping () -> Void) { self.context = context @@ -360,11 +360,10 @@ final class PeerInfoSelectionPanelNode: ASDisplayNode { let presentationData = context.sharedContext.currentPresentationData.with { $0 } self.separatorNode = ASDisplayNode() - self.backgroundNode = ASDisplayNode() + self.backgroundNode = NavigationBackgroundNode(color: presentationData.theme.rootController.navigationBar.blurredBackgroundColor) self.selectionPanel = ChatMessageSelectionInputPanelNode(theme: presentationData.theme, strings: presentationData.strings, peerMedia: true) self.selectionPanel.context = context - self.selectionPanel.backgroundColor = presentationData.theme.chat.inputPanel.panelBackgroundColor let interfaceInteraction = ChatPanelInterfaceInteraction(setupReplyMessage: { _, _ in }, setupEditMessage: { _, _ in @@ -466,7 +465,7 @@ final class PeerInfoSelectionPanelNode: ASDisplayNode { } func update(layout: ContainerViewLayout, presentationData: PresentationData, transition: ContainedViewLayoutTransition) -> CGFloat { - self.backgroundNode.backgroundColor = presentationData.theme.rootController.navigationBar.blurredBackgroundColor + self.backgroundNode.updateColor(color: presentationData.theme.rootController.navigationBar.blurredBackgroundColor, transition: .immediate) self.separatorNode.backgroundColor = presentationData.theme.rootController.navigationBar.separatorColor let interfaceState = ChatPresentationInterfaceState(chatWallpaper: .color(0), theme: presentationData.theme, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameDisplayOrder: presentationData.nameDisplayOrder, limitsConfiguration: .defaultValue, fontSize: .regular, bubbleCorners: PresentationChatBubbleCorners(mainRadius: 16.0, auxiliaryRadius: 8.0, mergeBubbleCorners: true), accountPeerId: self.context.account.peerId, mode: .standard(previewing: false), chatLocation: .peer(self.peerId), subject: nil, peerNearbyData: nil, greetingData: nil, pendingUnpinnedAllMessages: false, activeGroupCallInfo: nil, hasActiveGroupCall: false, importState: nil) @@ -477,6 +476,7 @@ final class PeerInfoSelectionPanelNode: ASDisplayNode { let panelHeightWithInset = panelHeight + layout.intrinsicInsets.bottom transition.updateFrame(node: self.backgroundNode, frame: CGRect(origin: CGPoint(), size: CGSize(width: layout.size.width, height: panelHeightWithInset))) + self.backgroundNode.update(size: self.backgroundNode.bounds.size, transition: transition) transition.updateFrame(node: self.separatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: -UIScreenPixel), size: CGSize(width: layout.size.width, height: UIScreenPixel))) return panelHeightWithInset