mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various fixes
This commit is contained in:
@@ -320,11 +320,6 @@ public class AttachmentController: ViewController {
|
||||
self.container.shouldCancelPanGesture = { [weak self] in
|
||||
if let strongSelf = self, let currentController = strongSelf.currentControllers.last {
|
||||
if !currentController.shouldDismissImmediately() {
|
||||
currentController.requestDismiss { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.controller?.dismiss(animated: true)
|
||||
}
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
@@ -334,6 +329,16 @@ public class AttachmentController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
self.container.requestDismiss = { [weak self] in
|
||||
if let strongSelf = self, let currentController = strongSelf.currentControllers.last {
|
||||
currentController.requestDismiss { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.controller?.dismiss(animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.panel.selectionChanged = { [weak self] type in
|
||||
if let strongSelf = self {
|
||||
return strongSelf.switchToController(type)
|
||||
|
||||
Reference in New Issue
Block a user