From e925acc622babda0a0aebaed87406f14955a4d43 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 8 Jun 2022 09:34:45 +0400 Subject: [PATCH] Don't show premium sticker tooltip if premium blocked. --- .../SourceFiles/history/view/history_view_sticker_toast.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp index 9605d25ac0..5ae255fd49 100644 --- a/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp +++ b/Telegram/SourceFiles/history/view/history_view_sticker_toast.cpp @@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/widgets/buttons.h" #include "data/data_document.h" #include "data/data_document_media.h" +#include "main/main_session.h" #include "lang/lang_keys.h" #include "ui/text/text_utilities.h" #include "boxes/sticker_set_box.h" @@ -39,7 +40,9 @@ StickerToast::~StickerToast() = default; void StickerToast::showFor(not_null document) { const auto sticker = document->sticker(); - if (!sticker || sticker->type != StickerType::Tgs) { + if (!sticker + || sticker->type != StickerType::Tgs + || !document->session().premiumPossible()) { return; } else if (const auto strong = _weak.get()) { if (_for == document) {