From 23e59d4d76850e1a301bb921e35ee4f974944873 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 17 Jan 2020 23:24:01 +0400 Subject: [PATCH] Fix poll-related theme changes --- submodules/ComposePollUI/Sources/CreatePollOptionItem.swift | 2 +- submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/submodules/ComposePollUI/Sources/CreatePollOptionItem.swift b/submodules/ComposePollUI/Sources/CreatePollOptionItem.swift index 233208574a..6a658bac2a 100644 --- a/submodules/ComposePollUI/Sources/CreatePollOptionItem.swift +++ b/submodules/ComposePollUI/Sources/CreatePollOptionItem.swift @@ -326,7 +326,7 @@ class CreatePollOptionItemNode: ItemListRevealOptionsItemNode, ItemListItemNode, let _ = textApply() if let currentText = strongSelf.textNode.attributedText { - if currentText.string != attributedText.string { + if currentText.string != attributedText.string || updatedTheme != nil { strongSelf.textNode.attributedText = attributedText } } else { diff --git a/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift b/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift index 22666adab8..a40405c95f 100644 --- a/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift +++ b/submodules/ItemListPeerItem/Sources/ItemListPeerItem.swift @@ -1361,6 +1361,10 @@ public final class ItemListPeerItemHeaderNode: ListViewItemHeaderNode, ItemListH public func updateTheme(theme: PresentationTheme) { self.theme = theme + self.backgroundNode.backgroundColor = theme.list.blocksBackgroundColor + self.snappedBackgroundNode.backgroundColor = theme.rootController.navigationBar.backgroundColor + self.separatorNode.backgroundColor = theme.list.itemBlocksSeparatorColor + let titleFont = Font.regular(13.0) self.textNode.attributedText = NSAttributedString(string: self.textNode.attributedText?.string ?? "", font: titleFont, textColor: theme.list.sectionHeaderTextColor)