Local scrolling

This commit is contained in:
Ali
2021-11-09 21:55:54 +04:00
parent ed5e3b3c5a
commit 920e16a17f
15 changed files with 440 additions and 170 deletions

View File

@@ -327,6 +327,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
self.historyNode.rotated = true
self.historyScrollingArea = SparseDiscreteScrollingArea()
self.historyNode.historyScrollingArea = self.historyScrollingArea
self.historyNodeContainer = ASDisplayNode()
self.historyNodeContainer.addSubnode(self.historyNode)
@@ -529,23 +530,6 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
self.textInputPanelNode?.updateActivity = { [weak self] in
self?.updateTypingActivity(true)
}
self.historyNode.updateScrollingIndicator = { [weak self] scrollingState, transition in
guard let strongSelf = self else {
return
}
guard let (_, _) = strongSelf.validLayout else {
return
}
strongSelf.historyScrollingArea.update(
containerSize: strongSelf.historyNode.bounds.size,
containerInsets: UIEdgeInsets(top: strongSelf.historyNode.scrollIndicatorInsets.bottom, left: 0.0, bottom: strongSelf.historyNode.scrollIndicatorInsets.top, right: 0.0),
scrollingState: scrollingState,
isScrolling: true,
theme: strongSelf.chatPresentationInterfaceState.theme,
transition: transition
)
}
}
deinit {