2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-06 17:35:36 +00:00

Explain registration from mobiles only.

This commit is contained in:
John Preston
2021-04-02 15:47:04 +04:00
parent b6c86fd298
commit 69b70cda54
2 changed files with 13 additions and 12 deletions

View File

@@ -397,17 +397,18 @@ void CodeWidget::submit() {
}
void CodeWidget::noTelegramCode() {
if (_noTelegramCodeRequestId) {
return;
}
_noTelegramCodeRequestId = api().request(MTPauth_ResendCode(
MTP_string(getData()->phone),
MTP_bytes(getData()->phoneHash)
)).done([=](const MTPauth_SentCode &result) {
noTelegramCodeDone(result);
}).fail([=](const MTP::Error &error) {
noTelegramCodeFail(error);
}).handleFloodErrors().send();
Ui::show(Box<InformBox>(tr::lng_code_register_phone(tr::now)));
//if (_noTelegramCodeRequestId) {
// return;
//}
//_noTelegramCodeRequestId = api().request(MTPauth_ResendCode(
// MTP_string(getData()->phone),
// MTP_bytes(getData()->phoneHash)
//)).done([=](const MTPauth_SentCode &result) {
// noTelegramCodeDone(result);
//}).fail([=](const MTP::Error &error) {
// noTelegramCodeFail(error);
//}).handleFloodErrors().send();
}
void CodeWidget::noTelegramCodeDone(const MTPauth_SentCode &result) {