Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-02-21 18:15:24 +03:00
parent 2dd23729b5
commit 8adf325410
9 changed files with 123 additions and 112 deletions

View File

@@ -241,11 +241,7 @@ public final class WebSearchController: ViewController {
}
navigationContentNode.cancel = { [weak self] in
if let strongSelf = self {
strongSelf.controllerNode.dismissInput?()
strongSelf.controllerNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in
self?.dismissed()
self?.dismiss()
})
strongSelf.cancel()
}
}
self.navigationBar?.setContentNode(navigationContentNode, animated: false)
@@ -320,6 +316,14 @@ public final class WebSearchController: ViewController {
self.selectionDisposable?.dispose()
}
public func cancel() {
self.controllerNode.dismissInput?()
self.controllerNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in
self?.dismissed()
self?.dismiss()
})
}
override public func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)