Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2021-09-25 17:22:08 +03:00
1864 changed files with 60797 additions and 27315 deletions

View File

@@ -1534,7 +1534,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
}
}, node: {
assert(Queue.mainQueue().isCurrent())
return previousNode.syncWith({ $0 })!
return previousNode.syncWith({ $0 })
}, params: params, previousItem: previousItem, nextItem: nextItem, animation: updateAnimation, completion: { (layout, apply) in
if Thread.isMainThread {
if synchronous {
@@ -1985,7 +1985,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
}
}, node: {
assert(Queue.mainQueue().isCurrent())
return referenceNode.syncWith({ $0 })!
return referenceNode.syncWith({ $0 })
}, params: ListViewItemLayoutParams(width: state.visibleSize.width, leftInset: state.insets.left, rightInset: state.insets.right, availableHeight: state.visibleSize.height - state.insets.top - state.insets.bottom), previousItem: index == 0 ? nil : self.items[index - 1], nextItem: index == self.items.count - 1 ? nil : self.items[index + 1], animation: updateAnimation, completion: { layout, apply in
var updatedState = state
var updatedOperations = operations
@@ -2424,7 +2424,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
var takenPreviousNodes = Set<ListViewItemNode>()
for operation in operations {
if case let .InsertNode(_, _, _, node, _, _) = operation {
takenPreviousNodes.insert(node.syncWith({ $0 })!)
takenPreviousNodes.insert(node.syncWith({ $0 }))
}
}
@@ -2436,7 +2436,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
for operation in operations {
switch operation {
case let .InsertNode(index, offsetDirection, nodeAnimated, nodeObject, layout, apply):
let node = nodeObject.syncWith({ $0 })!
let node = nodeObject.syncWith({ $0 })
var previousFrame: CGRect?
for (previousNode, frame) in previousApparentFrames {
if previousNode === node {
@@ -2499,7 +2499,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
var height: CGFloat?
var previousLayout: ListViewItemNodeLayout?
let referenceNode = referenceNodeObject.syncWith({ $0 })!
let referenceNode = referenceNodeObject.syncWith({ $0 })
for (node, previousFrame) in previousApparentFrames {
if node === referenceNode {