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

Use improved rpl::start().

This commit is contained in:
John Preston
2017-09-18 20:04:45 +03:00
parent ee9763c98f
commit 766e7dadb1
31 changed files with 145 additions and 179 deletions

View File

@@ -1846,8 +1846,9 @@ void MainWidget::createPlayer() {
if (!_player) {
_player.create(this);
_player->heightValue()
| rpl::on_next([this](int) { playerHeightUpdated(); })
| rpl::start(lifetime());
| rpl::start(
[this](int) { playerHeightUpdated(); },
lifetime());
_player->entity()->setCloseCallback([this] { closeBothPlayers(); });
_playerVolume.create(this);
_player->entity()->volumeWidgetCreated(_playerVolume);
@@ -1906,10 +1907,9 @@ void MainWidget::createCallTopBar() {
Expects(_currentCall != nullptr);
_callTopBar.create(this, object_ptr<Calls::TopBar>(this, _currentCall));
_callTopBar->heightValue()
| rpl::on_next([this](int value) {
| rpl::start([this](int value) {
callTopBarHeightUpdated(value);
})
| rpl::start(lifetime());
}, lifetime());
orderWidgets();
if (_a_show.animating()) {
_callTopBar->showFast();