This commit is contained in:
Ilya Laktyushin
2023-06-22 05:01:19 +04:00
parent 75c01b0897
commit 53aa40353a
9 changed files with 282 additions and 177 deletions

View File

@@ -1191,7 +1191,7 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
return bandingStart + (1.0 - (1.0 / ((bandedOffset * coefficient / range) + 1.0))) * range
}
if case .compact = layout.metrics.widthClass {
if case .compact = layout.metrics.widthClass, self.controller?.isPremium == true {
let cameraIsAlreadyOpened = self.controller?.hasStoryCameraTransition ?? false
if selectedIndex <= 0 && translation.x > 0.0 {
transitionFraction = 0.0
@@ -1204,6 +1204,11 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
transitionFraction = 0.0
return
}
} else {
if selectedIndex <= 0 && translation.x > 0.0 {
let overscroll = translation.x
transitionFraction = rubberBandingOffset(offset: overscroll, bandingStart: 0.0) / layout.size.width
}
}
if selectedIndex >= maxFilterIndex && translation.x < 0.0 {