mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Web app improvements
This commit is contained in:
@@ -28,6 +28,8 @@ public protocol AttachmentContainable: ViewController {
|
||||
var cancelPanGesture: () -> Void { get set }
|
||||
var isContainerPanning: () -> Bool { get set }
|
||||
|
||||
func isContainerPanningUpdated(_ panning: Bool)
|
||||
|
||||
func resetForReuse()
|
||||
func prepareForReuse()
|
||||
|
||||
@@ -35,6 +37,10 @@ public protocol AttachmentContainable: ViewController {
|
||||
}
|
||||
|
||||
public extension AttachmentContainable {
|
||||
func isContainerPanningUpdated(_ panning: Bool) {
|
||||
|
||||
}
|
||||
|
||||
func resetForReuse() {
|
||||
|
||||
}
|
||||
@@ -209,6 +215,12 @@ public class AttachmentController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
self.container.isPanningUpdated = { [weak self] value in
|
||||
if let strongSelf = self, let currentController = strongSelf.currentControllers.last, !value {
|
||||
currentController.isContainerPanningUpdated(value)
|
||||
}
|
||||
}
|
||||
|
||||
self.panel.selectionChanged = { [weak self] type in
|
||||
if let strongSelf = self {
|
||||
return strongSelf.switchToController(type)
|
||||
|
||||
Reference in New Issue
Block a user