mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Make MTP::Session handle the connection thread.
This commit is contained in:
@@ -453,18 +453,14 @@ void Account::destroyMtpKeys(MTP::AuthKeysList &&keys) {
|
||||
Core::App().dcOptions(),
|
||||
MTP::Instance::Mode::KeysDestroyer,
|
||||
std::move(destroyConfig));
|
||||
QObject::connect(
|
||||
_mtpForKeysDestroy.get(),
|
||||
&MTP::Instance::allKeysDestroyed,
|
||||
[=] { allKeysDestroyed(); });
|
||||
}
|
||||
|
||||
void Account::allKeysDestroyed() {
|
||||
LOG(("MTP Info: all keys scheduled for destroy are destroyed."));
|
||||
crl::on_main(this, [=] {
|
||||
_mtpForKeysDestroy = nullptr;
|
||||
Local::writeMtpData();
|
||||
});
|
||||
_mtpForKeysDestroy->allKeysDestroyed(
|
||||
) | rpl::start_with_next([=] {
|
||||
LOG(("MTP Info: all keys scheduled for destroy are destroyed."));
|
||||
crl::on_main(this, [=] {
|
||||
_mtpForKeysDestroy = nullptr;
|
||||
Local::writeMtpData();
|
||||
});
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
void Account::suggestMainDcId(MTP::DcId mainDcId) {
|
||||
|
Reference in New Issue
Block a user