mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various Fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
|
||||
private let containerInsets = UIEdgeInsets(top: 10.0, left: 10.0, bottom: 10.0, right: 10.0)
|
||||
|
||||
@@ -59,6 +60,7 @@ final class ActionSheetControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
self.bottomDimView.isUserInteractionEnabled = false
|
||||
|
||||
self.itemGroupsContainerNode = ActionSheetItemGroupsContainerNode(theme: self.theme)
|
||||
self.itemGroupsContainerNode.isUserInteractionEnabled = false
|
||||
|
||||
super.init()
|
||||
|
||||
@@ -128,6 +130,7 @@ final class ActionSheetControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
self.updateScrollDimViews(size: layout.size, insets: insets, transition: transition)
|
||||
}
|
||||
|
||||
|
||||
func animateIn(completion: @escaping () -> Void) {
|
||||
let tempDimView = UIView()
|
||||
tempDimView.backgroundColor = self.theme.dimColor
|
||||
@@ -144,6 +147,10 @@ final class ActionSheetControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
tempDimView?.removeFromSuperview()
|
||||
completion()
|
||||
})
|
||||
|
||||
Queue.mainQueue().after(0.3, {
|
||||
self.itemGroupsContainerNode.isUserInteractionEnabled = true
|
||||
})
|
||||
}
|
||||
|
||||
func animateOut(cancelled: Bool) {
|
||||
@@ -170,7 +177,7 @@ final class ActionSheetControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
}
|
||||
|
||||
@objc func dimNodeTap(_ recognizer: UITapGestureRecognizer) {
|
||||
if case .ended = recognizer.state {
|
||||
if case .ended = recognizer.state, self.itemGroupsContainerNode.isUserInteractionEnabled {
|
||||
self.view.window?.endEditing(true)
|
||||
self.animateOut(cancelled: true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user