mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-07 06:43:43 +00:00
Fix icon reload
This commit is contained in:
parent
5bfec6350d
commit
9bb017fa89
@ -156,6 +156,7 @@ final class StoragePeerTypeItemComponent: Component {
|
|||||||
func update(component: StoragePeerTypeItemComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
|
func update(component: StoragePeerTypeItemComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
|
||||||
let themeUpdated = self.component?.theme !== component.theme
|
let themeUpdated = self.component?.theme !== component.theme
|
||||||
|
|
||||||
|
let previousComponent = self.component
|
||||||
self.component = component
|
self.component = component
|
||||||
|
|
||||||
let leftInset: CGFloat = 62.0
|
let leftInset: CGFloat = 62.0
|
||||||
@ -252,7 +253,7 @@ final class StoragePeerTypeItemComponent: Component {
|
|||||||
labelView.bounds = CGRect(origin: CGPoint(), size: labelFrame.size)
|
labelView.bounds = CGRect(origin: CGPoint(), size: labelFrame.size)
|
||||||
}
|
}
|
||||||
|
|
||||||
if themeUpdated {
|
if themeUpdated || previousComponent?.iconName != component.iconName {
|
||||||
self.separatorLayer.backgroundColor = component.theme.list.itemBlocksSeparatorColor.cgColor
|
self.separatorLayer.backgroundColor = component.theme.list.itemBlocksSeparatorColor.cgColor
|
||||||
self.iconView.image = UIImage(bundleImageName: component.iconName)
|
self.iconView.image = UIImage(bundleImageName: component.iconName)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user