2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 16:05:57 +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

@@ -534,7 +534,7 @@ bool AuthSession::validateSelf(const MTPUser &user) {
return false;
} else if (user.c_user().vid().v != userId()) {
LOG(("Auth Error: wrong self user received."));
crl::on_main(this, [] { Core::App().logOut(); });
crl::on_main(this, [=] { _account->logOut(); });
return false;
}
return true;
@@ -558,6 +558,10 @@ void AuthSession::saveSettingsDelayed(crl::time delay) {
_saveDataTimer.callOnce(delay);
}
not_null<MTP::Instance*> AuthSession::mtp() {
return _account->mtp();
}
void AuthSession::localPasscodeChanged() {
_shouldLockAt = 0;
_autoLockTimer.cancel();