diff --git a/submodules/Display/Source/ContextMenuContainerNode.swift b/submodules/Display/Source/ContextMenuContainerNode.swift index 3eab3808b4..445654a944 100644 --- a/submodules/Display/Source/ContextMenuContainerNode.swift +++ b/submodules/Display/Source/ContextMenuContainerNode.swift @@ -33,7 +33,7 @@ public final class ContextMenuContainerNode: ASDisplayNode { self.containerNode.view.addSubview(effectView) self.effectView = effectView } else { - self.containerNode.backgroundColor = isDark ? UIColor(rgb: 0x8c8e8e) : UIColor(rgb: 0xF8F8F6) + self.containerNode.backgroundColor = isDark ? UIColor(rgb: 0x2f2f2f) : UIColor(rgb: 0xF8F8F6) } self.layer.shadowColor = UIColor.black.cgColor diff --git a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift index 3d0ce0ccfd..1e2d2e40ee 100644 --- a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift +++ b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift @@ -1046,7 +1046,30 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch var keyboardAppearance: UIKeyboardAppearance = UIKeyboardAppearance.default if let presentationInterfaceState = self.presentationInterfaceState { var lineStyle: ChatInputTextView.Theme.Quote.LineStyle = .solid - if let accountPeerColor = presentationInterfaceState.accountPeerColor { + let authorNameColor: UIColor + let dashSecondaryColor: UIColor? + let dashTertiaryColor: UIColor? + + if let context = self.context, let peer = presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, case .broadcast = peer.info, let nameColor = peer.nameColor { + let _ = nameColor + + lineStyle = .solid + authorNameColor = presentationInterfaceState.theme.list.itemAccentColor + dashSecondaryColor = nil + dashTertiaryColor = nil + + /*let colors = context.peerNameColors.get(nameColor) + + authorNameColor = colors.main + dashSecondaryColor = colors.secondary + dashTertiaryColor = colors.tertiary + + if dashSecondaryColor != nil { + lineStyle = .doubleDashed + } else { + lineStyle = .solid + }*/ + } else if let accountPeerColor = presentationInterfaceState.accountPeerColor { switch accountPeerColor.style { case .solid: lineStyle = .solid @@ -1055,11 +1078,24 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch case .tripleDashed: lineStyle = .tripleDashed } + + authorNameColor = presentationInterfaceState.theme.list.itemAccentColor + dashSecondaryColor = .clear + dashTertiaryColor = nil + } else { + lineStyle = .solid + authorNameColor = presentationInterfaceState.theme.list.itemAccentColor + dashSecondaryColor = nil + dashTertiaryColor = nil } + + let _ = dashSecondaryColor + let _ = dashTertiaryColor + textInputNode.textView.theme = ChatInputTextView.Theme( quote: ChatInputTextView.Theme.Quote( - background: presentationInterfaceState.theme.list.itemAccentColor.withMultipliedAlpha(presentationInterfaceState.theme.overallDarkAppearance ? 0.2 : 0.1), - foreground: presentationInterfaceState.theme.list.itemAccentColor, + background: authorNameColor.withMultipliedAlpha(presentationInterfaceState.theme.overallDarkAppearance ? 0.2 : 0.1), + foreground: authorNameColor, lineStyle: lineStyle ) )