| 47 | } |
| 48 | |
| 49 | void Shaker::shake() { |
| 50 | if (_animation.animating()) { |
| 51 | return; |
| 52 | } |
| 53 | _animation.start(DefaultShakeCallback([=, x = _widget->x()](int shift) { |
| 54 | _widget->moveToLeft(x + shift, _widget->y()); |
| 55 | }), 0., 1., st::shakeDuration); |
| 56 | } |
| 57 | |
| 58 | } // namespace |
| 59 |
no test coverage detected