Fix bot verification showing second check.

This commit is contained in:
John Preston 2025-01-07 20:53:43 +04:00
parent 2bb1c5d39b
commit 9d68ef6421
3 changed files with 6 additions and 4 deletions

View file

@ -117,6 +117,7 @@ void Badge::setContent(Content content) {
_view->show();
switch (_content.badge) {
case BadgeType::Verified:
case BadgeType::BotVerified:
case BadgeType::Premium: {
const auto id = _content.emojiStatusId;
const auto emoji = id

View file

@ -38,9 +38,10 @@ class EmojiStatusPanel;
enum class BadgeType {
None = 0x00,
Verified = 0x01,
Premium = 0x02,
Scam = 0x04,
Fake = 0x08,
BotVerified = 0x02,
Premium = 0x04,
Scam = 0x08,
Fake = 0x10,
};
inline constexpr bool is_flag_type(BadgeType) { return true; }

View file

@ -311,7 +311,7 @@ Cover::Cover(
) | rpl::map([=] {
const auto info = peer->botVerifyDetails();
return Badge::Content{
.badge = info ? BadgeType::Verified : BadgeType::None,
.badge = info ? BadgeType::BotVerified : BadgeType::None,
.emojiStatusId = info ? info->iconId : DocumentId(),
};
});