2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-07 13:46:05 +00:00

Remove Session::Exists() global access point.

This commit is contained in:
John Preston
2020-06-10 17:24:41 +04:00
parent 5f8d22f1f2
commit 598fb67cdf
19 changed files with 119 additions and 133 deletions

View File

@@ -104,8 +104,7 @@ BlobLoader::BlobLoader(
, _folder(folder)
, _id(id)
, _state(Loading{ 0, size })
, _mtproto(session->account().mtp())
, _mtprotoUserId(session->userId()) {
, _mtproto(session.get()) {
const auto ready = [=](std::unique_ptr<MTP::DedicatedLoader> loader) {
if (loader) {
setImplementation(std::move(loader));
@@ -113,12 +112,7 @@ BlobLoader::BlobLoader(
fail();
}
};
MTP::StartDedicatedLoader(
&_mtproto,
_mtprotoUserId,
location,
_folder,
ready);
MTP::StartDedicatedLoader(&_mtproto, location, _folder, ready);
}
int BlobLoader::id() const {