Pause spoilers when animations are disabled.
This commit is contained in:
parent
a7d90843a3
commit
e16cff487d
1 changed files with 3 additions and 0 deletions
|
|
@ -618,6 +618,9 @@ SpoilerAnimation::~SpoilerAnimation() {
|
||||||
|
|
||||||
int SpoilerAnimation::index(crl::time now, bool paused) {
|
int SpoilerAnimation::index(crl::time now, bool paused) {
|
||||||
const auto add = std::min(now - _last, kDefaultFrameDuration);
|
const auto add = std::min(now - _last, kDefaultFrameDuration);
|
||||||
|
if (anim::Disabled()) {
|
||||||
|
paused = true;
|
||||||
|
}
|
||||||
if (!paused || _last) {
|
if (!paused || _last) {
|
||||||
_accumulated += add;
|
_accumulated += add;
|
||||||
_last = paused ? 0 : now;
|
_last = paused ? 0 : now;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue