mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Attachment menu improvements
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user