| 319 | } |
| 320 | |
| 321 | void CodeWidget::callDone(const MTPauth_SentCode &result) { |
| 322 | result.match([&](const MTPDauth_sentCode &data) { |
| 323 | fillSentCodeData(data); |
| 324 | _code->setDigitsCountMax(getData()->codeLength); |
| 325 | if (_callStatus == CallStatus::Calling) { |
| 326 | _callStatus = CallStatus::Called; |
| 327 | getData()->callStatus = _callStatus; |
| 328 | getData()->callTimeout = _callTimeout; |
| 329 | updateCallText(); |
| 330 | } |
| 331 | }, [&](const MTPDauth_sentCodeSuccess &data) { |
| 332 | finish(data.vauthorization()); |
| 333 | }, [](const MTPDauth_sentCodePaymentRequired &) { |
| 334 | LOG(("API Error: Unexpected auth.sentCodePaymentRequired " |
| 335 | "(CodeWidget::callDone).")); |
| 336 | }); |
| 337 | } |
| 338 | |
| 339 | void CodeWidget::gotPassword(const MTPaccount_Password &result) { |
| 340 | Expects(result.type() == mtpc_account_password); |
no test coverage detected