2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Move delete-from-ToS to AuthSession.

This commit is contained in:
John Preston
2019-03-27 12:37:25 +04:00
parent 3fa3428b4b
commit efb2972d28
5 changed files with 16 additions and 10 deletions

View File

@@ -480,6 +480,12 @@ void AuthSession::localPasscodeChanged() {
checkAutoLock();
}
void AuthSession::termsDeleteNow() {
api().request(MTPaccount_DeleteAccount(
MTP_string("Decline ToS update")
)).send();
}
void AuthSession::checkAutoLock() {
if (!Global::LocalPasscode()
|| Core::App().passcodeLocked()) {