From 74e67660cb1ec00d32f271f83db3a447adb1216d Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 21 Jul 2020 14:04:34 +0300 Subject: [PATCH] Fix profile editing scrolling --- .../Sources/PeerInfo/PeerInfoScreen.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index e6d73a5364..76b09166f5 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -5389,12 +5389,14 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD guard let (_, navigationHeight) = self.validLayout else { return } - if self.state.isEditing && self.isSettings { - if targetContentOffset.pointee.y < navigationHeight { - if targetContentOffset.pointee.y < navigationHeight / 2.0 { - targetContentOffset.pointee.y = 0.0 - } else { - targetContentOffset.pointee.y = navigationHeight + if self.state.isEditing { + if self.isSettings { + if targetContentOffset.pointee.y < navigationHeight { + if targetContentOffset.pointee.y < navigationHeight / 2.0 { + targetContentOffset.pointee.y = 0.0 + } else { + targetContentOffset.pointee.y = navigationHeight + } } } } else {