Fix proxy icon doubling.

Fixes #4666.
This commit is contained in:
John Preston 2018-05-10 13:24:40 +03:00
parent 4d84781a65
commit 296e009808

View File

@ -205,10 +205,9 @@ base::unique_qptr<ConnectingWidget> ConnectingWidget::CreateDefaultWidget(
const auto weak = result.get();
rpl::combine(
result->visibility(),
parent->heightValue(),
std::move(shown)
) | rpl::start_with_next([=](float64 visible, int height, bool shown) {
const auto hidden = (visible == 0.) || !shown;
parent->heightValue()
) | rpl::start_with_next([=](float64 visible, int height) {
const auto hidden = (visible == 0.);
if (weak->isHidden() != hidden) {
weak->setVisible(!hidden);
}
@ -218,6 +217,11 @@ base::unique_qptr<ConnectingWidget> ConnectingWidget::CreateDefaultWidget(
height - weak->height(),
visible));
}, weak->lifetime());
std::move(
shown
) | rpl::start_with_next([=](bool shown) {
weak->setForceHidden(!shown);
}, weak->lifetime());
result->finishAnimating();
return result;
}