Poll and sticker pack improvements

This commit is contained in:
Ali
2020-04-15 18:40:13 +04:00
parent f0c1f3ff3e
commit 203acd8567
13 changed files with 324 additions and 77 deletions

View File

@@ -247,6 +247,13 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
super.init()
self.controller?.presentationContext.topLevelSubview = { [weak self] in
guard let strongSelf = self else {
return nil
}
return strongSelf.titleAccessoryPanelContainer.view
}
self.setViewBlock({
return ChatControllerNodeView()
})
@@ -1087,6 +1094,10 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
listInsets.top = listInsets.top + messageActionSheetControllerAdditionalInset
}
var childredLayout = layout
childredLayout.intrinsicInsets = UIEdgeInsets(top: listInsets.bottom, left: listInsets.right, bottom: listInsets.top, right: listInsets.left)
self.controller?.presentationContext.containerLayoutUpdated(childredLayout, transition: transition)
listViewTransaction(ListViewUpdateSizeAndInsets(size: contentBounds.size, insets: listInsets, scrollIndicatorInsets: listScrollIndicatorInsets, duration: duration, curve: curve, ensureTopInsetForOverlayHighlightedItems: ensureTopInsetForOverlayHighlightedItems), additionalScrollDistance, scrollToTop, { [weak self] in
if let strongSelf = self {
strongSelf.notifyTransitionCompletionListeners(transition: transition)