From 06fc23fc59e6fd062da8baac497e22722bb2721c Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 20 Jul 2018 15:28:06 +0300 Subject: [PATCH] Fix possible premature export bar destruction. --- Telegram/SourceFiles/mainwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 4ce0bd8b7b..22444f6be5 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1559,12 +1559,6 @@ void MainWidget::createExportTopBar(Export::View::Content &&data) { _exportTopBar.create( this, object_ptr(this, std::move(data))); - rpl::merge( - _exportTopBar->heightValue() | rpl::map([] { return true; }), - _exportTopBar->shownValue() - ) | rpl::start_with_next([=] { - exportTopBarHeightUpdated(); - }, _exportTopBar->lifetime()); _exportTopBar->entity()->clicks( ) | rpl::start_with_next([=] { if (_currentExportView) { @@ -1581,6 +1575,12 @@ void MainWidget::createExportTopBar(Export::View::Content &&data) { _exportTopBarHeight = _contentScrollAddToY = _exportTopBar->contentHeight(); updateControlsGeometry(); } + rpl::merge( + _exportTopBar->heightValue() | rpl::map([] { return true; }), + _exportTopBar->shownValue() + ) | rpl::start_with_next([=] { + exportTopBarHeightUpdated(); + }, _exportTopBar->lifetime()); } void MainWidget::destroyExportTopBar() {