2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use new animations engine in all Basic-s.

This commit is contained in:
John Preston
2019-04-01 21:44:54 +04:00
parent cd3c1c6dc0
commit a6e96f9a28
41 changed files with 479 additions and 487 deletions

View File

@@ -242,8 +242,8 @@ void EmojiButton::paintEvent(QPaintEvent *e) {
}
}
void EmojiButton::step_loading(crl::time ms, bool timer) {
if (timer && !anim::Disabled()) {
void EmojiButton::loadingAnimationCallback() {
if (!anim::Disabled()) {
update();
}
}
@@ -251,7 +251,7 @@ void EmojiButton::step_loading(crl::time ms, bool timer) {
void EmojiButton::setLoading(bool loading) {
if (loading && !_loading) {
_loading = std::make_unique<Ui::InfiniteRadialAnimation>(
animation(this, &EmojiButton::step_loading),
[=] { loadingAnimationCallback(); },
st::defaultInfiniteRadialAnimation);
}
if (loading) {