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

Added icon for inaccessible users.

This commit is contained in:
23rd
2022-11-11 09:40:33 +03:00
committed by John Preston
parent 3467fe226f
commit 823b4e6b98
11 changed files with 49 additions and 3 deletions

View File

@@ -248,9 +248,12 @@ void PeerData::updateNameDelayed(
not_null<Ui::EmptyUserpic*> PeerData::ensureEmptyUserpic() const {
if (!_userpicEmpty) {
const auto user = asUser();
_userpicEmpty = std::make_unique<Ui::EmptyUserpic>(
Data::PeerUserpicColor(id),
name());
user && user->isInaccessible()
? Ui::EmptyUserpic::InaccessibleName()
: name());
}
return _userpicEmpty.get();
}