Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-02-26 22:06:43 +04:00
parent 970203e0dc
commit b8e0fe64f2
10 changed files with 157 additions and 15 deletions

View File

@@ -24,6 +24,7 @@ public protocol AttachmentContainable: ViewController {
var requestAttachmentMenuExpansion: () -> Void { get set }
var updateNavigationStack: (@escaping ([AttachmentContainable]) -> [AttachmentContainable]) -> Void { get set }
var updateTabBarAlpha: (CGFloat, ContainedViewLayoutTransition) -> Void { get set }
var cancelPanGesture: () -> Void { get set }
func resetForReuse()
func prepareForReuse()
@@ -283,6 +284,11 @@ public class AttachmentController: ViewController {
strongSelf.panel.updateBackgroundAlpha(alpha, transition: transition)
}
}
controller.cancelPanGesture = { [weak self] in
if let strongSelf = self {
strongSelf.container.cancelPanGesture()
}
}
let previousController = strongSelf.currentControllers.last
let animateTransition = previousType != nil
strongSelf.currentControllers = [controller]