mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fx crash
This commit is contained in:
@@ -37,7 +37,7 @@ public enum StickerPackReference: PostboxCoding, Hashable, Equatable, Codable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
let container = try decoder.container(keyedBy: StringCodingKey.self)
|
let container = try decoder.container(keyedBy: StringCodingKey.self)
|
||||||
|
|
||||||
let discriminator = try container.decode(Int32.self, forKey: "r")
|
let discriminator = try container.decode(Int32.self, forKey: "r")
|
||||||
|
|||||||
@@ -1421,7 +1421,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
inputPanelUpdateTransition = .immediate
|
inputPanelUpdateTransition = .immediate
|
||||||
}
|
}
|
||||||
self.inputPanelBackgroundNode.update(size: CGSize(width: intrinsicInputPanelBackgroundNodeSize.width, height: intrinsicInputPanelBackgroundNodeSize.height + inputPanelBackgroundExtension), transition: inputPanelUpdateTransition)
|
self.inputPanelBackgroundNode.update(size: CGSize(width: intrinsicInputPanelBackgroundNodeSize.width, height: intrinsicInputPanelBackgroundNodeSize.height + inputPanelBackgroundExtension), transition: inputPanelUpdateTransition)
|
||||||
inputPanelUpdateTransition.updateFrame(node: self.inputPanelBottomBackgroundSeparatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: self.inputPanelBackgroundNode.frame.maxY + inputPanelBackgroundExtension), size: CGSize(width: self.inputPanelBackgroundNode.bounds.width, height: UIScreenPixel)))
|
transition.updateFrame(node: self.inputPanelBottomBackgroundSeparatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: self.inputPanelBackgroundNode.frame.maxY + inputPanelBackgroundExtension), size: CGSize(width: self.inputPanelBackgroundNode.bounds.width, height: UIScreenPixel)))
|
||||||
|
|
||||||
transition.updateFrame(node: self.inputPanelBackgroundSeparatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: apparentInputBackgroundFrame.origin.y), size: CGSize(width: apparentInputBackgroundFrame.size.width, height: UIScreenPixel)))
|
transition.updateFrame(node: self.inputPanelBackgroundSeparatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: apparentInputBackgroundFrame.origin.y), size: CGSize(width: apparentInputBackgroundFrame.size.width, height: UIScreenPixel)))
|
||||||
transition.updateFrame(node: self.navigateButtons, frame: apparentNavigateButtonsFrame)
|
transition.updateFrame(node: self.navigateButtons, frame: apparentNavigateButtonsFrame)
|
||||||
@@ -1496,15 +1496,17 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
if immediatelyLayoutInputNodeAndAnimateAppearance {
|
if immediatelyLayoutInputNodeAndAnimateAppearance {
|
||||||
var adjustedForPreviousInputHeightFrame = inputNodeFrame
|
var adjustedForPreviousInputHeightFrame = inputNodeFrame
|
||||||
var heightDifference = inputNodeHeight - previousInputHeight
|
var heightDifference = inputNodeHeight - previousInputHeight
|
||||||
|
var externalTopPanelContainerOffset: CGFloat = 0.0
|
||||||
if previousInputHeight.isLessThanOrEqualTo(cleanInsets.bottom) {
|
if previousInputHeight.isLessThanOrEqualTo(cleanInsets.bottom) {
|
||||||
heightDifference = inputNodeHeight - inputPanelBackgroundExtension
|
heightDifference = inputNodeHeight - inputPanelBackgroundExtension
|
||||||
|
externalTopPanelContainerOffset = inputPanelBackgroundExtension
|
||||||
}
|
}
|
||||||
adjustedForPreviousInputHeightFrame.origin.y += heightDifference
|
adjustedForPreviousInputHeightFrame.origin.y += heightDifference
|
||||||
inputNode.frame = adjustedForPreviousInputHeightFrame
|
inputNode.frame = adjustedForPreviousInputHeightFrame
|
||||||
transition.updateFrame(node: inputNode, frame: inputNodeFrame)
|
transition.updateFrame(node: inputNode, frame: inputNodeFrame)
|
||||||
|
|
||||||
if let externalTopPanelContainer = inputNode.externalTopPanelContainer {
|
if let externalTopPanelContainer = inputNode.externalTopPanelContainer {
|
||||||
externalTopPanelContainer.frame = CGRect(origin: adjustedForPreviousInputHeightFrame.offsetBy(dx: 0.0, dy: inputPanelBackgroundExtension).origin, size: CGSize(width: adjustedForPreviousInputHeightFrame.width, height: 0.0))
|
externalTopPanelContainer.frame = CGRect(origin: adjustedForPreviousInputHeightFrame.offsetBy(dx: 0.0, dy: externalTopPanelContainerOffset).origin, size: CGSize(width: adjustedForPreviousInputHeightFrame.width, height: 0.0))
|
||||||
transition.updateFrame(view: externalTopPanelContainer, frame: CGRect(origin: inputNodeFrame.origin, size: CGSize(width: inputNodeFrame.width, height: 0.0)))
|
transition.updateFrame(view: externalTopPanelContainer, frame: CGRect(origin: inputNodeFrame.origin, size: CGSize(width: inputNodeFrame.width, height: 0.0)))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user