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

Emoji status selector in MainMenu/Settings.

This commit is contained in:
John Preston
2022-08-11 20:22:21 +03:00
parent 64bd4f0926
commit bd089f20a8
18 changed files with 504 additions and 381 deletions

View File

@@ -1932,18 +1932,6 @@ auto ParticipantsBoxController::computeType(
? Rights::Admin
: Rights::Normal;
result.adminRank = user ? _additional.adminRank(user) : QString();
using Badge = Info::Profile::Badge;
result.badge = !user
? Badge::None
: user->isScam()
? Badge::Scam
: user->isFake()
? Badge::Fake
: user->isVerified()
? Badge::Verified
: (user->isPremium() && participant->session().premiumBadgesShown())
? Badge::Premium
: Badge::None;
return result;
}
@@ -1952,7 +1940,8 @@ void ParticipantsBoxController::recomputeTypeFor(
if (_role != Role::Profile) {
return;
}
if (const auto row = delegate()->peerListFindRow(participant->id.value)) {
const auto row = delegate()->peerListFindRow(participant->id.value);
if (row) {
static_cast<Row*>(row)->setType(computeType(participant));
}
}