MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / checkRequest

Method checkRequest

Telegram/SourceFiles/intro/intro_code.cpp:212–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void CodeWidget::checkRequest() {
213 auto status = api().instance().state(_sentRequest);
214 if (status < 0) {
215 auto leftms = -status;
216 if (leftms >= 1000) {
217 if (_sentRequest) {
218 api().request(base::take(_sentRequest)).cancel();
219 _sentCode.clear();
220 }
221 }
222 }
223 if (!_sentRequest && status == MTP::RequestSent) {
224 stopCheck();
225 }
226}
227
228void CodeWidget::codeSubmitDone(const MTPauth_Authorization &result) {
229 stopCheck();

Callers

nothing calls this directly

Calls 5

stateMethod · 0.45
instanceMethod · 0.45
cancelMethod · 0.45
requestMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected