diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m index b7c8e59536..e32c11cdb5 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m @@ -381,7 +381,11 @@ const CGFloat TGPhotoEditorSliderViewInternalMargin = 7.0f; - (void)setValue:(CGFloat)value animated:(BOOL)__unused animated { - _value = MIN(MAX(_lowerBoundValue, MAX(value, _minimumValue)), _maximumValue); + if (_lowerBoundValue > FLT_EPSILON) { + _value = MIN(MAX(_lowerBoundValue, MAX(value, _minimumValue)), _maximumValue); + } else { + _value = MIN(MAX(value, _minimumValue), _maximumValue); + } [self setNeedsLayout]; }