2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-06 17:35:36 +00:00

Move MTP::Instance to Main::Account.

This commit is contained in:
John Preston
2019-07-24 10:46:23 +02:00
parent db2018c765
commit 9cf4cf6dca
32 changed files with 715 additions and 526 deletions

View File

@@ -13,8 +13,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unixtime.h"
#include "storage/localstorage.h"
#include "core/application.h"
#include "mainwindow.h"
#include "core/click_handler_types.h"
#include "mainwindow.h"
#include "main/main_account.h"
#include "info/info_memento.h"
#include "info/settings/info_settings_widget.h"
#include "window/window_session_controller.h"
@@ -1390,7 +1391,7 @@ Updater::~Updater() {
UpdateChecker::UpdateChecker()
: _updater(GetUpdaterInstance()) {
if (IsAppLaunched()) {
if (const auto mtproto = Core::App().mtp()) {
if (const auto mtproto = Core::App().activeAccount().mtp()) {
_updater->setMtproto(mtproto);
}
}