2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/zlib_help.h"
#include "layout.h"
#include "core/application.h"
#include "main/main_account.h"
#include "mainwidget.h"
#include "styles/style_boxes.h"
#include "styles/style_chat_helpers.h"
@@ -245,7 +246,7 @@ Loader::Loader(QObject *parent, int id)
, _id(id)
, _size(GetDownloadSize(_id))
, _state(Loading{ 0, _size })
, _mtproto(Core::App().mtp()) {
, _mtproto(Core::App().activeAccount().mtp()) {
const auto ready = [=](std::unique_ptr<MTP::DedicatedLoader> loader) {
if (loader) {
setImplementation(std::move(loader));