Fix expansionProgress

This commit is contained in:
Peter 2019-07-29 22:19:08 +03:00
parent 556d39a952
commit f348a8809b

View File

@ -75,7 +75,7 @@ class NavigationBarSearchContentNode: NavigationBarContentNode {
func updateExpansionProgress(_ progress: CGFloat, animated: Bool = false) { func updateExpansionProgress(_ progress: CGFloat, animated: Bool = false) {
let newProgress = max(0.0, min(10.0, progress)) let newProgress = max(0.0, min(10.0, progress))
if abs(newProgress - self.expansionProgress) > 0.0001 && (progress <= 1.0 || self.expansionProgress != 1.0) { if abs(newProgress - self.expansionProgress) > 0.0001 {
self.expansionProgress = newProgress self.expansionProgress = newProgress
let transition: ContainedViewLayoutTransition = animated ? .animated(duration: 0.3, curve: ContainedViewLayoutTransitionCurve.slide) : .immediate let transition: ContainedViewLayoutTransition = animated ? .animated(duration: 0.3, curve: ContainedViewLayoutTransitionCurve.slide) : .immediate