mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Web app improvements
This commit is contained in:
parent
9146416f68
commit
0a08c0908b
@ -157,10 +157,6 @@ final class AttachmentContainer: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||||||
}
|
}
|
||||||
if let view = otherGestureRecognizer.view, view.description.contains("WKChildScroll") {
|
if let view = otherGestureRecognizer.view, view.description.contains("WKChildScroll") {
|
||||||
return false
|
return false
|
||||||
// let velocity = panGestureRecognizer.velocity(in: nil)
|
|
||||||
// if abs(velocity.x) > abs(velocity.y) * 2.0 {
|
|
||||||
// return false
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
if let _ = otherGestureRecognizer.view?.asyncdisplaykit_node as? CollectionIndexNode {
|
if let _ = otherGestureRecognizer.view?.asyncdisplaykit_node as? CollectionIndexNode {
|
||||||
return false
|
return false
|
||||||
@ -222,7 +218,7 @@ final class AttachmentContainer: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||||||
let currentHitView = self.hitTest(point, with: nil)
|
let currentHitView = self.hitTest(point, with: nil)
|
||||||
|
|
||||||
var scrollViewAndListNode = self.findScrollView(view: currentHitView)
|
var scrollViewAndListNode = self.findScrollView(view: currentHitView)
|
||||||
if scrollViewAndListNode?.0.frame.height == self.frame.width {
|
if scrollViewAndListNode?.0.frame.height == self.frame.width || scrollViewAndListNode?.0.isDescendant(of: self.view) == false {
|
||||||
scrollViewAndListNode = nil
|
scrollViewAndListNode = nil
|
||||||
}
|
}
|
||||||
let scrollView = scrollViewAndListNode?.0
|
let scrollView = scrollViewAndListNode?.0
|
||||||
|
@ -77,6 +77,8 @@ public final class NavigationContainer: ASDisplayNode, ASGestureRecognizerDelega
|
|||||||
public private(set) var controllers: [ViewController] = []
|
public private(set) var controllers: [ViewController] = []
|
||||||
private var state: State = State(layout: nil, canBeClosed: nil, top: nil, transition: nil, pending: nil)
|
private var state: State = State(layout: nil, canBeClosed: nil, top: nil, transition: nil, pending: nil)
|
||||||
|
|
||||||
|
weak var minimizedContainer: MinimizedContainer?
|
||||||
|
|
||||||
private var ignoreInputHeight: Bool = false
|
private var ignoreInputHeight: Bool = false
|
||||||
|
|
||||||
public private(set) var isReady: Bool = false
|
public private(set) var isReady: Bool = false
|
||||||
@ -235,6 +237,13 @@ public final class NavigationContainer: ASDisplayNode, ASGestureRecognizerDelega
|
|||||||
let topNode = topController.displayNode
|
let topNode = topController.displayNode
|
||||||
var bottomControllerLayout = layout
|
var bottomControllerLayout = layout
|
||||||
if bottomController.view.disableAutomaticKeyboardHandling.isEmpty {
|
if bottomController.view.disableAutomaticKeyboardHandling.isEmpty {
|
||||||
|
if let minimizedContainer = self.minimizedContainer, (bottomControllerLayout.inputHeight ?? 0.0) > 0.0 {
|
||||||
|
var updatedSize = bottomControllerLayout.size
|
||||||
|
var updatedIntrinsicInsets = bottomControllerLayout.intrinsicInsets
|
||||||
|
updatedSize.height -= minimizedContainer.collapsedHeight(layout: layout)
|
||||||
|
updatedIntrinsicInsets.bottom = 0.0
|
||||||
|
bottomControllerLayout = bottomControllerLayout.withUpdatedSize(updatedSize).withUpdatedIntrinsicInsets(updatedIntrinsicInsets)
|
||||||
|
}
|
||||||
bottomControllerLayout = bottomControllerLayout.withUpdatedInputHeight(nil)
|
bottomControllerLayout = bottomControllerLayout.withUpdatedInputHeight(nil)
|
||||||
}
|
}
|
||||||
bottomController.containerLayoutUpdated(bottomControllerLayout, transition: .immediate)
|
bottomController.containerLayoutUpdated(bottomControllerLayout, transition: .immediate)
|
||||||
|
@ -873,6 +873,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
|||||||
let updatedLayout = layout.withUpdatedSize(updatedSize).withUpdatedIntrinsicInsets(updatedIntrinsicInsets)
|
let updatedLayout = layout.withUpdatedSize(updatedSize).withUpdatedIntrinsicInsets(updatedIntrinsicInsets)
|
||||||
transition.updateFrame(node: flatContainer, frame: CGRect(origin: CGPoint(), size: updatedSize))
|
transition.updateFrame(node: flatContainer, frame: CGRect(origin: CGPoint(), size: updatedSize))
|
||||||
flatContainer.update(layout: updatedLayout, canBeClosed: false, controllers: controllers, transition: transition)
|
flatContainer.update(layout: updatedLayout, canBeClosed: false, controllers: controllers, transition: transition)
|
||||||
|
flatContainer.minimizedContainer = self.minimizedContainer
|
||||||
case let .split(splitContainer):
|
case let .split(splitContainer):
|
||||||
let flatContainer = NavigationContainer(isFlat: self.isFlat, controllerRemoved: { [weak self] controller in
|
let flatContainer = NavigationContainer(isFlat: self.isFlat, controllerRemoved: { [weak self] controller in
|
||||||
self?.controllerRemoved(controller)
|
self?.controllerRemoved(controller)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user