Fix dice animating to the last frame.

I hope this fixes #7465.
This commit is contained in:
John Preston 2020-03-29 13:47:07 +04:00
parent 90a1cea515
commit c209aedb22

View file

@ -254,6 +254,10 @@ void Sticker::unloadLottie() {
if (!_lottie) {
return;
}
if (_diceIndex > 0 && _lastDiceFrame.isNull()) {
_nextLastDiceFrame = false;
_lottieOncePlayed = false;
}
_lottie = nullptr;
_parent->data()->history()->owner().unregisterHeavyViewPart(_parent);
}