Story location improvements

This commit is contained in:
Isaac 2024-06-07 19:34:53 +04:00
parent dcfc4d9364
commit 2254886ae3
2 changed files with 4 additions and 4 deletions

View File

@ -180,10 +180,10 @@ public final class LocationMapHeaderNode: ASDisplayNode {
public func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, topPadding: CGFloat, offset: CGFloat, size: CGSize, transition: ContainedViewLayoutTransition) {
self.validLayout = (layout, navigationBarHeight, topPadding, offset, size)
let mapHeight: CGFloat = floor(layout.size.height * 1.3)
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset, width: size.width, height: mapHeight)
let mapHeight: CGFloat = floor(layout.size.height * 1.3) + layout.intrinsicInsets.top * 2.0
let mapFrame = CGRect(x: 0.0, y: floorToScreenPixels((size.height - mapHeight + navigationBarHeight) / 2.0) + offset + floor(layout.intrinsicInsets.top * 0.5), width: size.width, height: mapHeight)
transition.updateFrame(node: self.mapNode, frame: mapFrame)
self.mapNode.updateLayout(size: mapFrame.size, topPadding: layout.intrinsicInsets.top)
self.mapNode.updateLayout(size: mapFrame.size, topPadding: 0.0)
let inset: CGFloat = 6.0

View File

@ -3051,7 +3051,7 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
return
}
let mapOverscrollInset: CGFloat = 200.0
let mapOverscrollInset: CGFloat = 300.0
var mapHeight = min(size.width, size.height)
mapHeight = min(mapHeight, floor(size.height * 0.389))