mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix possible premature export bar destruction.
This commit is contained in:
parent
41977bf515
commit
06fc23fc59
1 changed files with 6 additions and 6 deletions
|
@ -1559,12 +1559,6 @@ void MainWidget::createExportTopBar(Export::View::Content &&data) {
|
|||
_exportTopBar.create(
|
||||
this,
|
||||
object_ptr<Export::View::TopBar>(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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue