diff --git a/Telegram/ThirdParty/qtlottie b/Telegram/ThirdParty/qtlottie index 1d23bd35d..5213d12d6 160000 --- a/Telegram/ThirdParty/qtlottie +++ b/Telegram/ThirdParty/qtlottie @@ -1 +1 @@ -Subproject commit 1d23bd35d1e540d7c1aaf7ff88db22d914f4947c +Subproject commit 5213d12d619e3a37fb912153990ceb1e49e0adc6 diff --git a/Telegram/ThirdParty/qtlottie_helper/QtBodymovin/private/bmproperty_p.h b/Telegram/ThirdParty/qtlottie_helper/QtBodymovin/private/bmproperty_p.h index b2b41a62b..cd2626585 100644 --- a/Telegram/ThirdParty/qtlottie_helper/QtBodymovin/private/bmproperty_p.h +++ b/Telegram/ThirdParty/qtlottie_helper/QtBodymovin/private/bmproperty_p.h @@ -431,11 +431,15 @@ public: if (!this->m_animated) return false; - int adjustedFrame = qBound(this->m_startFrame, frame, this->m_endFrame); - if (const EasingSegment *easing = BMProperty::getEasingSegment(adjustedFrame)) { - qreal progress = ((adjustedFrame - this->m_startFrame) * 1.0) / - (this->m_endFrame - this->m_startFrame); - qreal easedValue = easing->easing.valueForProgress(progress); + int adjustedFrame = qBound(this->m_startFrame, frame, this->m_endFrame); + if (const EasingSegment *easing = BMProperty::getEasingSegment(adjustedFrame)) { + qreal progress; + if (easing->endFrame == easing->startFrame) + progress = 1; + else + progress = ((adjustedFrame - easing->startFrame) * 1.0) / + (easing->endFrame - easing->startFrame); + qreal easedValue = easing->easing.valueForProgress(progress); // For the time being, 4D vectors are used only for colors, and // the value must be restricted to between [0, 1] easedValue = qBound(qreal(0.0), easedValue, qreal(1.0));