[WIP] Video message send context menu

This commit is contained in:
Isaac
2024-05-13 23:37:30 +04:00
parent 8736981248
commit 3da1b96775
6 changed files with 224 additions and 49 deletions

View File

@@ -511,6 +511,9 @@ final class MediaPickerSelectedListNode: ASDisplayNode, ASScrollViewDelegate, AS
private let persistentItems: Bool
private let isExternalPreview: Bool
var globalClippingRect: CGRect?
var layoutType: ChatSendMessageContextScreenMediaPreviewLayoutType {
return .message
}
fileprivate var wallpaperBackgroundNode: WallpaperBackgroundNode?
private let scrollNode: ASScrollNode
@@ -656,7 +659,7 @@ final class MediaPickerSelectedListNode: ASDisplayNode, ASScrollViewDelegate, AS
}
func animateOut(transition: ContainedViewLayoutTransition, completion: @escaping () -> Void = {}) {
if let wallpaperBackgroundNode = self.wallpaperBackgroundNode{
if let wallpaperBackgroundNode = self.wallpaperBackgroundNode {
wallpaperBackgroundNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.25, removeOnCompletion: false, completion: { [weak self] _ in
completion()
@@ -714,6 +717,10 @@ final class MediaPickerSelectedListNode: ASDisplayNode, ASScrollViewDelegate, AS
}
}
func animateOutOnSend(transition: Transition) {
transition.setAlpha(view: self.view, alpha: 0.0)
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}