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

Don't show premium star when premium unavailable.

This commit is contained in:
John Preston
2022-06-08 16:53:16 +04:00
parent aaf1383304
commit 916f86b401
14 changed files with 75 additions and 75 deletions

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/unread_badge.h"
#include "data/data_peer.h"
#include "main/main_session.h"
#include "dialogs/ui/dialogs_layout.h"
#include "lang/lang_keys.h"
#include "styles/style_dialogs.h"
@@ -117,7 +118,9 @@ int DrawPeerBadgeGetWidth(
rectForName.y(),
outerWidth);
return iconw;
} else if (peer->isPremium() && st.premium) {
} else if (peer->isPremium()
&& st.premium
&& peer->session().premiumPossible()) {
const auto iconw = st.premium->width();
st.premium->paint(
p,