Don't show premium sticker tooltip if premium blocked.
This commit is contained in:
parent
a780fbd09b
commit
e925acc622
|
@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
#include "data/data_document.h"
|
#include "data/data_document.h"
|
||||||
#include "data/data_document_media.h"
|
#include "data/data_document_media.h"
|
||||||
|
#include "main/main_session.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "ui/text/text_utilities.h"
|
#include "ui/text/text_utilities.h"
|
||||||
#include "boxes/sticker_set_box.h"
|
#include "boxes/sticker_set_box.h"
|
||||||
|
@ -39,7 +40,9 @@ StickerToast::~StickerToast() = default;
|
||||||
|
|
||||||
void StickerToast::showFor(not_null<DocumentData*> document) {
|
void StickerToast::showFor(not_null<DocumentData*> document) {
|
||||||
const auto sticker = document->sticker();
|
const auto sticker = document->sticker();
|
||||||
if (!sticker || sticker->type != StickerType::Tgs) {
|
if (!sticker
|
||||||
|
|| sticker->type != StickerType::Tgs
|
||||||
|
|| !document->session().premiumPossible()) {
|
||||||
return;
|
return;
|
||||||
} else if (const auto strong = _weak.get()) {
|
} else if (const auto strong = _weak.get()) {
|
||||||
if (_for == document) {
|
if (_for == document) {
|
||||||
|
|
Loading…
Reference in New Issue