2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +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

@@ -44,6 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_domain.h"
#include "main/main_session.h"
#include "media/view/media_view_overlay_widget.h"
#include "media/view/media_view_open_common.h"
#include "mtproto/mtproto_dc_options.h"
#include "mtproto/mtproto_config.h"
#include "mtproto/mtp_instance.h"
@@ -284,6 +285,13 @@ void Application::run() {
&& Ui::Integration::Instance().openglLastCheckFailed()) {
showOpenGLCrashNotification();
}
_window->openInMediaViewRequests(
) | rpl::start_with_next([=](Media::View::OpenRequest &&request) {
if (_mediaView) {
_mediaView->show(std::move(request));
}
}, _window->lifetime());
}
void Application::showOpenGLCrashNotification() {