Better private chat title.

GitOrigin-RevId: 0e2eea7961667d25810d14cb0db53806a9525e4e
This commit is contained in:
levlam 2018-06-15 20:41:21 +03:00
parent e5c90f239f
commit 4aa5b0af02

View File

@ -2948,7 +2948,13 @@ string ContactsManager::get_user_title(UserId user_id) const {
if (u == nullptr) {
return string();
}
return u->last_name.empty() ? u->first_name : u->first_name + " " + u->last_name;
if (u->last_name.empty()) {
return u->first_name;
}
if (u->first_name.empty()) {
return u->last_name;
}
return PSTRING() << u->first_name << ' ' << u->last_name;
}
string ContactsManager::get_chat_title(ChatId chat_id) const {