Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-03-08 20:44:45 +04:00
parent 8f560ba10b
commit 8f44a8fee6
19 changed files with 461 additions and 130 deletions

View File

@@ -159,13 +159,19 @@ final class MediaPickerGridItemNode: GridItemNode {
let wasHidden = self.isHidden
self.isHidden = self.interaction?.hiddenMediaId == asset.localIdentifier
if !self.isHidden && wasHidden {
self.checkNode?.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.gradientNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.typeIconNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.durationNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.animateFadeIn(animateCheckNode: true)
}
}
}
func animateFadeIn(animateCheckNode: Bool) {
if animateCheckNode {
self.checkNode?.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
}
self.gradientNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.typeIconNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
self.durationNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
}
override func didLoad() {
super.didLoad()