2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added initial ability to show content in OverlayWidget from Controller.

This commit is contained in:
23rd
2021-06-14 09:33:54 +03:00
committed by John Preston
parent b422ec025e
commit 0e89c93993
9 changed files with 138 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "main/main_session_settings.h"
#include "main/main_app_config.h"
#include "media/view/media_view_open_common.h"
#include "intro/intro_widget.h"
#include "mtproto/mtproto_config.h"
#include "ui/layers/box_content.h"
@@ -373,4 +374,17 @@ Window::Adaptive &Controller::adaptive() const {
return *_adaptive;
}
void Controller::openInMediaView(Media::View::OpenRequest &&request) {
_openInMediaViewRequests.fire(std::move(request));
}
auto Controller::openInMediaViewRequests() const
-> rpl::producer<Media::View::OpenRequest> {
return _openInMediaViewRequests.events();
}
rpl::lifetime &Controller::lifetime() {
return _lifetime;
}
} // namespace Window