mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02: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(
|
_exportTopBar.create(
|
||||||
this,
|
this,
|
||||||
object_ptr<Export::View::TopBar>(this, std::move(data)));
|
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(
|
_exportTopBar->entity()->clicks(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
if (_currentExportView) {
|
if (_currentExportView) {
|
||||||
|
@ -1581,6 +1575,12 @@ void MainWidget::createExportTopBar(Export::View::Content &&data) {
|
||||||
_exportTopBarHeight = _contentScrollAddToY = _exportTopBar->contentHeight();
|
_exportTopBarHeight = _contentScrollAddToY = _exportTopBar->contentHeight();
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
}
|
}
|
||||||
|
rpl::merge(
|
||||||
|
_exportTopBar->heightValue() | rpl::map([] { return true; }),
|
||||||
|
_exportTopBar->shownValue()
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
exportTopBarHeightUpdated();
|
||||||
|
}, _exportTopBar->lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWidget::destroyExportTopBar() {
|
void MainWidget::destroyExportTopBar() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue