Warn user about passport reset.

Also suggest country by phone number in passport.
This commit is contained in:
John Preston
2018-04-20 20:42:51 +04:00
parent 275ec3e679
commit ab5f35e952
15 changed files with 141 additions and 53 deletions
+3 -1
View File
@@ -296,8 +296,9 @@ void CodeWidget::gotPassword(const MTPaccount_Password &result) {
case mtpc_account_password: {
auto &d = result.c_account_password();
getData()->pwdSalt = qba(d.vcurrent_salt);
getData()->hasRecovery = mtpIsTrue(d.vhas_recovery);
getData()->hasRecovery = d.is_has_recovery();
getData()->pwdHint = qs(d.vhint);
getData()->pwdNotEmptyPassport = d.is_has_secure_values();
goReplace(new Intro::PwdCheckWidget(parentWidget(), getData()));
} break;
}
@@ -314,6 +315,7 @@ void CodeWidget::submit() {
getData()->pwdSalt = QByteArray();
getData()->hasRecovery = false;
getData()->pwdHint = QString();
getData()->pwdNotEmptyPassport = false;
_sentRequest = MTP::send(MTPauth_SignIn(MTP_string(getData()->phone), MTP_bytes(getData()->phoneHash), MTP_string(_sentCode)), rpcDone(&CodeWidget::codeSubmitDone), rpcFail(&CodeWidget::codeSubmitFail));
}