From a0b3b1affde61926694364dd1bc79fd7b0c059d2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 24 Mar 2019 09:51:00 +0400 Subject: [PATCH] Fix fade in widget animation. Fixes #5812. --- Telegram/SourceFiles/ui/effects/fade_animation.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/ui/effects/fade_animation.cpp b/Telegram/SourceFiles/ui/effects/fade_animation.cpp index 4bc81fb968..a4ac01c7ca 100644 --- a/Telegram/SourceFiles/ui/effects/fade_animation.cpp +++ b/Telegram/SourceFiles/ui/effects/fade_animation.cpp @@ -146,12 +146,11 @@ void FadeAnimation::startAnimation(int duration) { } void FadeAnimation::updateCallback() { - if (_animation.animating()) { - _widget->update(); - if (_updatedCallback) { - _updatedCallback(_animation.value(_visible ? 1. : 0.)); - } - } else { + _widget->update(); + if (_updatedCallback) { + _updatedCallback(_animation.value(_visible ? 1. : 0.)); + } + if (!_animation.animating()) { stopAnimation(); } }