Animate color change

This commit is contained in:
Isaac
2023-11-23 19:36:06 +04:00
parent dd57e99cca
commit 556e9bb430

View File

@@ -119,6 +119,10 @@ final class PeerNameColorProfilePreviewItemNode: ListViewItemNode {
guard let self else {
return
}
if let previousItem = self.item, (previousItem.peer?.profileColor != item.peer?.profileColor) || (previousItem.peer?.profileBackgroundEmojiId != item.peer?.profileBackgroundEmojiId) {
UIView.transition(with: self.view, duration: 0.2, options: UIView.AnimationOptions.transitionCrossDissolve, animations: {
})
}
self.item = item
self.topStripeNode.backgroundColor = item.theme.list.itemBlocksSeparatorColor