2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Allow searching USA by 'United States'.

This commit is contained in:
John Preston
2019-06-22 14:01:54 +02:00
parent dc102bd9e8
commit a4d83b679a
10 changed files with 493 additions and 481 deletions

View File

@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/themes/window_theme.h"
#include "lang/lang_keys.h"
#include "data/data_user.h"
#include "data/data_countries.h" // Data::ValidPhoneCode
#include "mainwindow.h"
#include "numbers.h"
#include "auth_session.h"
@@ -3968,7 +3969,7 @@ void CountryCodeInput::correctValue(
}
}
if (!addToNumber.isEmpty()) {
auto validCode = findValidCode(newText.mid(1));
auto validCode = Data::ValidPhoneCode(newText.mid(1));
addToNumber = newText.mid(1 + validCode.length()) + addToNumber;
newText = '+' + validCode;
}