summaryrefslogtreecommitdiffstats
path: root/Telegram/SourceFiles/history/view/history_view_item_preview.h
diff options
context:
space:
mode:
Diffstat (limited to 'Telegram/SourceFiles/history/view/history_view_item_preview.h')
-rw-r--r--Telegram/SourceFiles/history/view/history_view_item_preview.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Telegram/SourceFiles/history/view/history_view_item_preview.h b/Telegram/SourceFiles/history/view/history_view_item_preview.h
index 6bf76ecf97..a2229cddf4 100644
--- a/Telegram/SourceFiles/history/view/history_view_item_preview.h
+++ b/Telegram/SourceFiles/history/view/history_view_item_preview.h
@@ -13,6 +13,10 @@ struct ItemPreviewImage {
QImage data;
uint64 cacheKey = 0;
+ [[nodiscard]] bool hasSpoiler() const {
+ return (cacheKey & 1);
+ }
+
explicit operator bool() const {
return !data.isNull();
}