Exemplo n.º 1
0
void PhoneWidget::phoneCheckDone(const MTPauth_CheckedPhone &result) {
	stopCheck();

	auto &d = result.c_auth_checkedPhone();
	if (mtpIsTrue(d.vphone_registered)) {
		hidePhoneError();

		_checkRequest->start(1000);

		_sentRequest = MTP::send(MTPauth_SendCode(MTP_flags(0), MTP_string(_sentPhone), MTPBool(), MTP_int(ApiId), MTP_string(ApiHash)), rpcDone(&PhoneWidget::phoneSubmitDone), rpcFail(&PhoneWidget::phoneSubmitFail));
	} else {
		showSignup();
		_sentRequest = 0;
	}
}
Exemplo n.º 2
0
void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) {
	stopCheck();

	const MTPDauth_checkedPhone &d(result.c_auth_checkedPhone());
	if (d.vphone_registered.v) {
		disableAll();
		showError("");

		checkRequest.start(1000);

		sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Application::language())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
	} else {
		showError(lang(lng_bad_phone_noreg), true);
		enableAll(true);
	}
}
Exemplo n.º 3
0
void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) {
	stopCheck();

	const auto &d(result.c_auth_checkedPhone());
	if (mtpIsTrue(d.vphone_registered)) {
		disableAll();
		showError(QString());

		checkRequest.start(1000);

		MTPauth_SendCode::Flags flags = 0;
		sentRequest = MTP::send(MTPauth_SendCode(MTP_flags(flags), MTP_string(sentPhone), MTPBool(), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Sandbox::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail));
	} else {
		showError(lang(lng_bad_phone_noreg), true);
		enableAll(true);
		sentRequest = 0;
	}
}