From f4dfd738eca4bd7a187ecc88a6705c6e24644df8 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 3 Dec 2020 21:10:08 +0300 Subject: [PATCH] Added hiding of Blob animations at animations disabling. --- .../SourceFiles/calls/calls_group_members.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_group_members.cpp b/Telegram/SourceFiles/calls/calls_group_members.cpp index 15de07f965..fb48433f65 100644 --- a/Telegram/SourceFiles/calls/calls_group_members.cpp +++ b/Telegram/SourceFiles/calls/calls_group_members.cpp @@ -516,14 +516,19 @@ MembersController::MembersController( _coloredCrossLine.invalidate(); }, _lifetime); - Core::App().appDeactivates( - ) | rpl::start_with_next([=](bool hide) { - _speakingAnimationHideLastTime = hide ? crl::now() : 0; + rpl::combine( + rpl::single(anim::Disabled()) | rpl::then(anim::Disables()), + rpl::single(false) | rpl::then(Core::App().appDeactivates()) + ) | rpl::start_with_next([=](bool animDisabled, bool deactivated) { + const auto hide = !(!animDisabled && !deactivated); + + if (!(hide && _speakingAnimationHideLastTime)) { + _speakingAnimationHideLastTime = hide ? crl::now() : 0; + } for (const auto [_, row] : _speakingRowBySsrc) { if (hide) { - row->updateLevel(0.); + updateRowLevel(row, 0.); } - updateRowLevel(row, 0.); if (!hide && !_speakingAnimation.animating()) { _speakingAnimation.start(); }