Upgrade greeting sticker to new transition animation

This commit is contained in:
Ilya Laktyushin
2021-05-05 19:11:18 +04:00
parent f884d9586c
commit ff7fc4b142
11 changed files with 37 additions and 150 deletions

View File

@@ -792,23 +792,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
}
}
var greetingStickerNode: (ASDisplayNode, ASDisplayNode, ASDisplayNode, (@escaping () -> Void) -> Void)? {
if let greetingStickerNode = self.emptyNode?.greetingStickerNode {
let historyNode = self.historyNode
historyNode.alpha = 0.0
return (greetingStickerNode, self, self.historyNode, { completion in
historyNode.alpha = 1.0
historyNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, completion: { _ in
completion()
})
})
} else {
return nil
}
}
private var isInFocus: Bool = false
func inFocusUpdated(isInFocus: Bool) {
self.isInFocus = isInFocus