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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user