mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Temp fixes
This commit is contained in:
parent
3f87ee8321
commit
9d6518a738
5 changed files with 18 additions and 7 deletions
|
|
@ -3873,7 +3873,11 @@ open class ListView: ASDisplayNode, ASScrollViewDelegate, ASGestureRecognizerDel
|
|||
switch item.stickDirection {
|
||||
case .top:
|
||||
naturalY = lowerBound
|
||||
headerFrame = CGRect(origin: CGPoint(x: 0.0, y: min(max(upperDisplayBound, upperBound), lowerBound - itemHeaderHeight)), size: CGSize(width: self.visibleSize.width, height: itemHeaderHeight))
|
||||
if item.isSticky {
|
||||
headerFrame = CGRect(origin: CGPoint(x: 0.0, y: min(max(upperDisplayBound, upperBound), lowerBound - itemHeaderHeight)), size: CGSize(width: self.visibleSize.width, height: itemHeaderHeight))
|
||||
} else {
|
||||
headerFrame = CGRect(origin: CGPoint(x: 0.0, y: min(upperBound, lowerBound - itemHeaderHeight)), size: CGSize(width: self.visibleSize.width, height: itemHeaderHeight))
|
||||
}
|
||||
stickLocationDistance = headerFrame.minY - upperBound
|
||||
stickLocationDistanceFactor = max(0.0, min(1.0, stickLocationDistance / itemHeaderHeight))
|
||||
case .topEdge:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public protocol ListViewItemHeader: AnyObject {
|
|||
var id: ListViewItemNode.HeaderId { get }
|
||||
var stackingId: ListViewItemNode.HeaderId? { get }
|
||||
var stickDirection: ListViewItemHeaderStickDirection { get }
|
||||
var isSticky: Bool { get }
|
||||
var height: CGFloat { get }
|
||||
var stickOverInsets: Bool { get }
|
||||
|
||||
|
|
@ -21,6 +22,12 @@ public protocol ListViewItemHeader: AnyObject {
|
|||
func updateNode(_ node: ListViewItemHeaderNode, previous: ListViewItemHeader?, next: ListViewItemHeader?)
|
||||
}
|
||||
|
||||
public extension ListViewItemHeader {
|
||||
var isSticky: Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
open class ListViewItemHeaderNode: ASDisplayNode {
|
||||
let isRotated: Bool
|
||||
final private(set) var internalStickLocationDistanceFactor: CGFloat = 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue