2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Phone numbers starting with '0' are not formatted with '+'.

Sticker with reply layout fixed. Report box title corrected.
Elided text display sometimes didn't restore last block, fixed.
Removed non-existent class diagram file from MSVC project.
This commit is contained in:
John Preston
2016-06-08 19:40:33 +03:00
parent 445cd680c7
commit 8b2c351933
6 changed files with 19 additions and 15 deletions

View File

@@ -123,6 +123,8 @@ namespace App {
QString formatPhone(QString phone) {
if (phone.isEmpty()) return QString();
if (phone.at(0) == '0') return phone;
QString number = phone;
for (const QChar *ch = phone.constData(), *e = ch + phone.size(); ch != e; ++ch) {
if (ch->unicode() < '0' || ch->unicode() > '9') {