Web app improvements

This commit is contained in:
Ilya Laktyushin
2022-04-02 15:51:30 +04:00
parent bb0339b6f4
commit 1bcdd691ec
10 changed files with 154 additions and 43 deletions

View File

@@ -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)