mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -193,6 +193,7 @@ public class AdditionalLinkItemNode: ListViewItemNode, ItemListItemNode {
|
||||
|
||||
return { item, params, neighbors, firstWithHeader, last in
|
||||
var updatedTheme: PresentationTheme?
|
||||
var updatedIsActive = false
|
||||
|
||||
let titleFont = Font.regular(item.presentationData.fontSize.itemListBaseFontSize)
|
||||
let subtitleFont = Font.regular(floor(item.presentationData.fontSize.itemListBaseFontSize * 14.0 / 17.0))
|
||||
@@ -200,6 +201,9 @@ public class AdditionalLinkItemNode: ListViewItemNode, ItemListItemNode {
|
||||
if currentItem?.presentationData.theme !== item.presentationData.theme {
|
||||
updatedTheme = item.presentationData.theme
|
||||
}
|
||||
if currentItem?.username?.isActive != item.username?.isActive {
|
||||
updatedIsActive = true
|
||||
}
|
||||
|
||||
let iconColor: UIColor
|
||||
if let username = item.username {
|
||||
@@ -303,7 +307,11 @@ public class AdditionalLinkItemNode: ListViewItemNode, ItemListItemNode {
|
||||
strongSelf.backgroundNode.backgroundColor = itemBackgroundColor
|
||||
strongSelf.highlightedBackgroundNode.backgroundColor = item.presentationData.theme.list.itemHighlightedBackgroundColor
|
||||
|
||||
strongSelf.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Link"), color: item.presentationData.theme.list.itemCheckColors.foregroundColor)
|
||||
|
||||
}
|
||||
|
||||
if updatedIsActive || updatedTheme != nil {
|
||||
strongSelf.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: item.username?.isActive == true ? "Chat/Context Menu/Link" : "Chat/Context Menu/Unlink"), color: item.presentationData.theme.list.itemCheckColors.foregroundColor)
|
||||
}
|
||||
|
||||
let transition = ContainedViewLayoutTransition.immediate
|
||||
|
||||
Reference in New Issue
Block a user