2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-07 18:15:15 +00:00

Handle ToS correctly when signing up.

This commit is contained in:
John Preston
2018-06-01 10:00:18 +03:00
parent 2878e46d2b
commit 80be464d95
12 changed files with 239 additions and 191 deletions

View File

@@ -274,7 +274,7 @@ void CodeWidget::onSendCall() {
void CodeWidget::callDone(const MTPauth_SentCode &v) {
if (v.type() == mtpc_auth_sentCode) {
fillSentCodeData(v.c_auth_sentCode().vtype);
fillSentCodeData(v.c_auth_sentCode());
_code->setDigitsCountMax(getData()->codeLength);
}
if (_callStatus == Widget::Data::CallStatus::Calling) {
@@ -328,8 +328,8 @@ void CodeWidget::noTelegramCodeDone(const MTPauth_SentCode &result) {
return;
}
auto &d = result.c_auth_sentCode();
fillSentCodeData(d.vtype);
const auto &d = result.c_auth_sentCode();
fillSentCodeData(d);
_code->setDigitsCountMax(getData()->codeLength);
if (d.has_next_type() && d.vnext_type.type() == mtpc_auth_codeTypeCall) {
getData()->callStatus = Widget::Data::CallStatus::Waiting;