mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +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(
|
_phoneLine.setText(
|
||||||
st::webPageDescriptionStyle,
|
st::webPageDescriptionStyle,
|
||||||
Ui::FormatPhone(QString(phone).replace(QChar('+'), QString())),
|
Ui::FormatPhone(phone),
|
||||||
Ui::WebpageTextTitleOptions());
|
Ui::WebpageTextTitleOptions());
|
||||||
|
|
||||||
#if 0 // No info.
|
#if 0 // No info.
|
||||||
|
|
|
@ -388,7 +388,9 @@ QString FormatPhone(const QString &phone) {
|
||||||
if (phone.at(0) == '0') {
|
if (phone.at(0) == '0') {
|
||||||
return phone;
|
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) {
|
QString FormatTTL(float64 ttl) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue