mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Update settings screen
This commit is contained in:
@@ -71,6 +71,16 @@ private final class ChatEmptyNodeNearbyChatContent: ASDisplayNode, ChatEmptyNode
|
||||
private var didSetupSticker = false
|
||||
private let disposable = MetaDisposable()
|
||||
|
||||
var greetingStickerNode: ASDisplayNode? {
|
||||
if let animationNode = self.stickerNode.animationNode, animationNode.supernode === stickerNode {
|
||||
return animationNode
|
||||
} else if self.stickerNode.imageNode.supernode === stickerNode {
|
||||
return self.stickerNode.imageNode
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
init(account: Account, interaction: ChatPanelInterfaceInteraction?) {
|
||||
self.account = account
|
||||
self.interaction = interaction
|
||||
@@ -655,7 +665,8 @@ final class ChatEmptyNode: ASDisplayNode {
|
||||
let node: ASDisplayNode & ChatEmptyNodeContent
|
||||
switch contentType {
|
||||
case .regular:
|
||||
node = ChatEmptyNodeRegularChatContent()
|
||||
// node = ChatEmptyNodeRegularChatContent()
|
||||
node = ChatEmptyNodeNearbyChatContent(account: self.account, interaction: self.interaction)
|
||||
case .secret:
|
||||
node = ChatEmptyNodeSecretChatContent()
|
||||
case .group:
|
||||
@@ -668,9 +679,8 @@ final class ChatEmptyNode: ASDisplayNode {
|
||||
self.content = (contentType, node)
|
||||
self.addSubnode(node)
|
||||
contentTransition = .immediate
|
||||
|
||||
self.isUserInteractionEnabled = contentType == .peerNearby
|
||||
}
|
||||
self.isUserInteractionEnabled = contentType == .peerNearby || contentType == .regular
|
||||
|
||||
let displayRect = CGRect(origin: CGPoint(x: 0.0, y: insets.top), size: CGSize(width: size.width, height: size.height - insets.top - insets.bottom))
|
||||
|
||||
@@ -686,6 +696,15 @@ final class ChatEmptyNode: ASDisplayNode {
|
||||
|
||||
transition.updateFrame(node: self.backgroundNode, frame: contentFrame)
|
||||
}
|
||||
|
||||
var greetingStickerNode: ASDisplayNode? {
|
||||
if let (_, node) = self.content {
|
||||
if let node = node as? ChatEmptyNodeNearbyChatContent {
|
||||
return node.greetingStickerNode
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user