mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix bot verification showing second check.
This commit is contained in:
parent
2bb1c5d39b
commit
9d68ef6421
3 changed files with 6 additions and 4 deletions
|
@ -117,6 +117,7 @@ void Badge::setContent(Content content) {
|
||||||
_view->show();
|
_view->show();
|
||||||
switch (_content.badge) {
|
switch (_content.badge) {
|
||||||
case BadgeType::Verified:
|
case BadgeType::Verified:
|
||||||
|
case BadgeType::BotVerified:
|
||||||
case BadgeType::Premium: {
|
case BadgeType::Premium: {
|
||||||
const auto id = _content.emojiStatusId;
|
const auto id = _content.emojiStatusId;
|
||||||
const auto emoji = id
|
const auto emoji = id
|
||||||
|
|
|
@ -38,9 +38,10 @@ class EmojiStatusPanel;
|
||||||
enum class BadgeType {
|
enum class BadgeType {
|
||||||
None = 0x00,
|
None = 0x00,
|
||||||
Verified = 0x01,
|
Verified = 0x01,
|
||||||
Premium = 0x02,
|
BotVerified = 0x02,
|
||||||
Scam = 0x04,
|
Premium = 0x04,
|
||||||
Fake = 0x08,
|
Scam = 0x08,
|
||||||
|
Fake = 0x10,
|
||||||
};
|
};
|
||||||
inline constexpr bool is_flag_type(BadgeType) { return true; }
|
inline constexpr bool is_flag_type(BadgeType) { return true; }
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,7 @@ Cover::Cover(
|
||||||
) | rpl::map([=] {
|
) | rpl::map([=] {
|
||||||
const auto info = peer->botVerifyDetails();
|
const auto info = peer->botVerifyDetails();
|
||||||
return Badge::Content{
|
return Badge::Content{
|
||||||
.badge = info ? BadgeType::Verified : BadgeType::None,
|
.badge = info ? BadgeType::BotVerified : BadgeType::None,
|
||||||
.emojiStatusId = info ? info->iconId : DocumentId(),
|
.emojiStatusId = info ? info->iconId : DocumentId(),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue