2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Move passcode management from MainWindow.

Check for auto lock in AuthSession. Don't autolock while video plays.
Closes #3219
This commit is contained in:
John Preston
2017-04-15 21:48:54 +03:00
parent e3aacc8072
commit de7c886008
14 changed files with 88 additions and 52 deletions

View File

@@ -59,8 +59,7 @@ void PasscodeWidget::onSubmit() {
if (App::main()) {
if (Local::checkPasscode(_passcode->text().toUtf8())) {
cSetPasscodeBadTries(0);
App::wnd()->clearPasscode(); // Destroys this widget.
Messenger::Instance().clearPasscode(); // Destroys this widget.
return;
} else {
cSetPasscodeBadTries(cPasscodeBadTries() + 1);