Various theme fixes

This commit is contained in:
Ilya Laktyushin
2021-09-05 16:37:22 +03:00
parent d8f6f1fed0
commit e050657c15
4 changed files with 12 additions and 14 deletions

View File

@@ -258,15 +258,14 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode {
func updateThemeAndStrings(theme: PresentationTheme, strings: PresentationStrings, forwardOptionsState: ChatInterfaceForwardOptionsState?, force: Bool = false) {
if force || self.theme !== theme || self.strings !== strings || self.forwardOptionsState != forwardOptionsState {
let previousTheme = self.theme
self.theme = theme
self.strings = strings
self.forwardOptionsState = forwardOptionsState
if self.theme !== theme {
self.closeButton.setImage(PresentationResourcesChat.chatInputPanelCloseIconImage(theme), for: [])
self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme)
self.iconNode.image = PresentationResourcesChat.chatInputPanelForwardIconImage(theme)
}
self.closeButton.setImage(PresentationResourcesChat.chatInputPanelCloseIconImage(theme), for: [])
self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme)
self.iconNode.image = PresentationResourcesChat.chatInputPanelForwardIconImage(theme)
let filteredMessages = self.messages
@@ -278,7 +277,7 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode {
text = "\(self.authors ?? ""): \(string)"
} else {
title = self.strings.Conversation_ForwardOptions_ForwardTitle(Int32(filteredMessages.count))
text = "From \(self.authors ?? "")"
text = self.strings.Conversation_ForwardFrom(self.authors ?? "").string
}
self.titleNode.attributedText = NSAttributedString(string: title, font: Font.medium(15.0), textColor: self.theme.chat.inputPanel.panelControlAccentColor)