2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

links preview done

This commit is contained in:
John Preston
2015-04-04 23:01:34 +03:00
parent 868d5f60f3
commit f3bb155b0a
67 changed files with 2712 additions and 1416 deletions

View File

@@ -158,6 +158,14 @@ void IntroCode::activate() {
code.setFocus();
}
void IntroCode::prepareShow() {
code.setText(QString());
if (sentRequest) {
MTP::cancel(sentRequest);
sentRequest = 0;
}
}
void IntroCode::deactivate() {
callTimer.stop();
hide();
@@ -222,8 +230,7 @@ bool IntroCode::codeSubmitFail(const RPCError &error) {
checkRequest.start(1000);
sentRequest = MTP::send(MTPaccount_GetPassword(), rpcDone(&IntroCode::gotPassword), rpcFail(&IntroCode::codeSubmitFail));
return true;
}
if (QRegularExpression("^FLOOD_WAIT_(\\d+)$").match(err).hasMatch()) {
} else if (error.type().startsWith(qsl("FLOOD_WAIT_"))) {
showError(lang(lng_flood_error));
code.setFocus();
return true;