Pause spoilers when animations are disabled.

This commit is contained in:
John Preston 2022-09-09 21:03:33 +04:00
parent a7d90843a3
commit e16cff487d

View file

@ -618,6 +618,9 @@ SpoilerAnimation::~SpoilerAnimation() {
int SpoilerAnimation::index(crl::time now, bool paused) {
const auto add = std::min(now - _last, kDefaultFrameDuration);
if (anim::Disabled()) {
paused = true;
}
if (!paused || _last) {
_accumulated += add;
_last = paused ? 0 : now;