2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Rename Text to Ui::Text::String.

This commit is contained in:
John Preston
2019-06-12 15:26:04 +02:00
parent e9677779b8
commit 2162aa8df0
92 changed files with 615 additions and 531 deletions

View File

@@ -592,7 +592,7 @@ not_null<const PeerData*> PeerData::migrateToOrMe() const {
return this;
}
const Text &PeerData::topBarNameText() const {
const Ui::Text::String &PeerData::topBarNameText() const {
if (const auto to = migrateTo()) {
return to->topBarNameText();
} else if (const auto user = asUser()) {
@@ -603,7 +603,7 @@ const Text &PeerData::topBarNameText() const {
return _nameText;
}
const Text &PeerData::nameText() const {
const Ui::Text::String &PeerData::nameText() const {
if (const auto to = migrateTo()) {
return to->nameText();
}
@@ -611,7 +611,10 @@ const Text &PeerData::nameText() const {
}
const QString &PeerData::shortName() const {
return isUser() ? asUser()->firstName : name;
if (const auto user = asUser()) {
return user->firstName.isEmpty() ? user->lastName : user->firstName;
}
return name;
}
QString PeerData::userName() const {