mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Added hiding of Blob animations at animations disabling.
This commit is contained in:
parent
79d5a49e7c
commit
f4dfd738ec
1 changed files with 10 additions and 5 deletions
|
@ -516,14 +516,19 @@ MembersController::MembersController(
|
||||||
_coloredCrossLine.invalidate();
|
_coloredCrossLine.invalidate();
|
||||||
}, _lifetime);
|
}, _lifetime);
|
||||||
|
|
||||||
Core::App().appDeactivates(
|
rpl::combine(
|
||||||
) | rpl::start_with_next([=](bool hide) {
|
rpl::single(anim::Disabled()) | rpl::then(anim::Disables()),
|
||||||
_speakingAnimationHideLastTime = hide ? crl::now() : 0;
|
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) {
|
for (const auto [_, row] : _speakingRowBySsrc) {
|
||||||
if (hide) {
|
if (hide) {
|
||||||
row->updateLevel(0.);
|
updateRowLevel(row, 0.);
|
||||||
}
|
}
|
||||||
updateRowLevel(row, 0.);
|
|
||||||
if (!hide && !_speakingAnimation.animating()) {
|
if (!hide && !_speakingAnimation.animating()) {
|
||||||
_speakingAnimation.start();
|
_speakingAnimation.start();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue