mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Allow tapping on avatar node
This commit is contained in:
@@ -256,6 +256,7 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
var iconColor = theme.chatList.unpinnedArchiveAvatarColor.foregroundColor
|
var iconColor = theme.chatList.unpinnedArchiveAvatarColor.foregroundColor
|
||||||
var backgroundColor = theme.chatList.unpinnedArchiveAvatarColor.backgroundColors.topColor
|
var backgroundColor = theme.chatList.unpinnedArchiveAvatarColor.backgroundColors.topColor
|
||||||
let animationBackgroundNode = ASImageNode()
|
let animationBackgroundNode = ASImageNode()
|
||||||
|
animationBackgroundNode.isUserInteractionEnabled = false
|
||||||
animationBackgroundNode.frame = self.imageNode.frame
|
animationBackgroundNode.frame = self.imageNode.frame
|
||||||
if let overrideImage = self.overrideImage, case let .archivedChatsIcon(hiddenByDefault) = overrideImage {
|
if let overrideImage = self.overrideImage, case let .archivedChatsIcon(hiddenByDefault) = overrideImage {
|
||||||
let backgroundColors: (UIColor, UIColor)
|
let backgroundColors: (UIColor, UIColor)
|
||||||
@@ -274,6 +275,7 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
self.addSubnode(animationBackgroundNode)
|
self.addSubnode(animationBackgroundNode)
|
||||||
|
|
||||||
let animationNode = AnimationNode(animation: "anim_archiveAvatar", colors: ["box1.box1.Fill 1": iconColor, "box3.box3.Fill 1": iconColor, "box2.box2.Fill 1": backgroundColor], scale: 0.1653828)
|
let animationNode = AnimationNode(animation: "anim_archiveAvatar", colors: ["box1.box1.Fill 1": iconColor, "box3.box3.Fill 1": iconColor, "box2.box2.Fill 1": backgroundColor], scale: 0.1653828)
|
||||||
|
animationNode.isUserInteractionEnabled = false
|
||||||
animationNode.completion = { [weak animationBackgroundNode, weak self] in
|
animationNode.completion = { [weak animationBackgroundNode, weak self] in
|
||||||
self?.imageNode.isHidden = false
|
self?.imageNode.isHidden = false
|
||||||
animationBackgroundNode?.removeFromSupernode()
|
animationBackgroundNode?.removeFromSupernode()
|
||||||
@@ -344,6 +346,7 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
if self.editOverlayNode == nil {
|
if self.editOverlayNode == nil {
|
||||||
let editOverlayNode = AvatarEditOverlayNode()
|
let editOverlayNode = AvatarEditOverlayNode()
|
||||||
editOverlayNode.frame = self.imageNode.frame
|
editOverlayNode.frame = self.imageNode.frame
|
||||||
|
editOverlayNode.isUserInteractionEnabled = false
|
||||||
self.addSubnode(editOverlayNode)
|
self.addSubnode(editOverlayNode)
|
||||||
|
|
||||||
self.editOverlayNode = editOverlayNode
|
self.editOverlayNode = editOverlayNode
|
||||||
|
|||||||
@@ -296,11 +296,13 @@ public class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNo
|
|||||||
self.avatarNode = AvatarNode(font: avatarFont)
|
self.avatarNode = AvatarNode(font: avatarFont)
|
||||||
|
|
||||||
self.updatingAvatarOverlay = ASImageNode()
|
self.updatingAvatarOverlay = ASImageNode()
|
||||||
|
self.updatingAvatarOverlay.isUserInteractionEnabled = false
|
||||||
self.updatingAvatarOverlay.displayWithoutProcessing = true
|
self.updatingAvatarOverlay.displayWithoutProcessing = true
|
||||||
self.updatingAvatarOverlay.displaysAsynchronously = false
|
self.updatingAvatarOverlay.displaysAsynchronously = false
|
||||||
|
|
||||||
self.activityIndicator = ActivityIndicator(type: .custom(.white, 22.0, 1.0, false))
|
self.activityIndicator = ActivityIndicator(type: .custom(.white, 22.0, 1.0, false))
|
||||||
self.activityIndicator.isHidden = true
|
self.activityIndicator.isHidden = true
|
||||||
|
self.activityIndicator.isUserInteractionEnabled = false
|
||||||
|
|
||||||
self.nameNode = TextNode()
|
self.nameNode = TextNode()
|
||||||
self.nameNode.isUserInteractionEnabled = false
|
self.nameNode.isUserInteractionEnabled = false
|
||||||
|
|||||||
Reference in New Issue
Block a user