diff --git a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift index 161e3e103c..bc7dbcf3a9 100644 --- a/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift +++ b/submodules/InstantPageUI/Sources/InstantPageControllerNode.swift @@ -337,7 +337,11 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate { let maxBarHeight: CGFloat if !layout.safeInsets.top.isZero { - maxBarHeight = layout.safeInsets.top + 34.0 + if let statusBarHeight = layout.statusBarHeight, statusBarHeight > 34.0 { + maxBarHeight = statusBarHeight + 34.0 + } else { + maxBarHeight = layout.safeInsets.top + 34.0 + } } else { maxBarHeight = (layout.statusBarHeight ?? 0.0) + 44.0 } @@ -692,7 +696,11 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate { let maxBarHeight: CGFloat let minBarHeight: CGFloat if !containerLayout.safeInsets.top.isZero { - maxBarHeight = containerLayout.safeInsets.top + 34.0 + if let statusBarHeight = containerLayout.statusBarHeight, statusBarHeight > 34.0 { + maxBarHeight = statusBarHeight + 44.0 + } else { + maxBarHeight = containerLayout.safeInsets.top + 34.0 + } minBarHeight = containerLayout.safeInsets.top + 8.0 } else { maxBarHeight = (containerLayout.statusBarHeight ?? 0.0) + 44.0