Remove MTP::MainInstance() global access point.

This commit is contained in:
John Preston
2020-06-11 20:09:46 +04:00
parent 7f09da9e32
commit 0ad7dcaef9
84 changed files with 823 additions and 1362 deletions
@@ -410,8 +410,8 @@ auto ApiWrap::fileRequest(const Data::FileLocation &location, int offset) {
}).toDC(MTP::ShiftDcId(location.dcId, MTP::kExportMediaDcShift)));
}
ApiWrap::ApiWrap(Fn<void(FnMut<void()>)> runner)
: _mtp(std::move(runner))
ApiWrap::ApiWrap(QPointer<MTP::Instance> weak, Fn<void(FnMut<void()>)> runner)
: _mtp(weak, std::move(runner))
, _fileCache(std::make_unique<LoadedFileCache>(kLocationCacheSize)) {
}