2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Use Window::Controller to manage MainWindow.

This commit is contained in:
John Preston
2019-06-06 14:20:21 +03:00
parent a547f80ae9
commit dd68c7e90d
18 changed files with 229 additions and 61 deletions

View File

@@ -29,6 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "window/themes/window_theme.h"
#include "window/notifications_manager.h"
#include "window/window_controller.h"
#include "platform/platform_notifications_manager.h"
#include "storage/file_upload.h"
#include "storage/localstorage.h"
@@ -102,8 +103,8 @@ namespace App {
}
MainWindow *wnd() {
return Core::IsAppLaunched()
? Core::App().getActiveWindow()
return (Core::IsAppLaunched() && Core::App().activeWindow())
? Core::App().activeWindow()->widget().get()
: nullptr;
}