mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Fixed phone formatting generally.
This commit is contained in:
parent
93d1a187ca
commit
afdd22d154
2 changed files with 4 additions and 2 deletions
|
@ -97,7 +97,7 @@ Contact::Contact(
|
|||
|
||||
_phoneLine.setText(
|
||||
st::webPageDescriptionStyle,
|
||||
Ui::FormatPhone(QString(phone).replace(QChar('+'), QString())),
|
||||
Ui::FormatPhone(phone),
|
||||
Ui::WebpageTextTitleOptions());
|
||||
|
||||
#if 0 // No info.
|
||||
|
|
|
@ -388,7 +388,9 @@ QString FormatPhone(const QString &phone) {
|
|||
if (phone.at(0) == '0') {
|
||||
return phone;
|
||||
}
|
||||
return Countries::Instance().format({ .phone = phone }).formatted;
|
||||
return Countries::Instance().format({
|
||||
.phone = (phone.at(0) == '+') ? phone.mid(1) : phone,
|
||||
}).formatted;
|
||||
}
|
||||
|
||||
QString FormatTTL(float64 ttl) {
|
||||
|
|
Loading…
Add table
Reference in a new issue