| 1093 | } |
| 1094 | |
| 1095 | void MainWidget::createExportTopBar(Export::View::Content &&data) { |
| 1096 | _exportTopBar.create( |
| 1097 | this, |
| 1098 | object_ptr<Export::View::TopBar>(this, std::move(data)), |
| 1099 | _controller->adaptive().oneColumnValue()); |
| 1100 | _exportTopBar->entity()->clicks( |
| 1101 | ) | rpl::on_next([=] { |
| 1102 | if (_currentExportView) { |
| 1103 | _currentExportView->activatePanel(); |
| 1104 | } |
| 1105 | }, _exportTopBar->lifetime()); |
| 1106 | orderWidgets(); |
| 1107 | if (_showAnimation) { |
| 1108 | _exportTopBar->show(anim::type::instant); |
| 1109 | _exportTopBar->setVisible(false); |
| 1110 | } else { |
| 1111 | _exportTopBar->hide(anim::type::instant); |
| 1112 | _exportTopBar->show(anim::type::normal); |
| 1113 | _exportTopBarHeight = _contentScrollAddToY = _exportTopBar->contentHeight(); |
| 1114 | updateControlsGeometry(); |
| 1115 | } |
| 1116 | rpl::merge( |
| 1117 | _exportTopBar->heightValue() | rpl::map_to(true), |
| 1118 | _exportTopBar->shownValue() |
| 1119 | ) | rpl::on_next([=] { |
| 1120 | exportTopBarHeightUpdated(); |
| 1121 | }, _exportTopBar->lifetime()); |
| 1122 | } |
| 1123 | |
| 1124 | void MainWidget::destroyExportTopBar() { |
| 1125 | if (_exportTopBar) { |
nothing calls this directly
no test coverage detected