diff --git a/Telegram/SourceFiles/history/history_media_types.cpp b/Telegram/SourceFiles/history/history_media_types.cpp index 91340c60b0..248962730a 100644 --- a/Telegram/SourceFiles/history/history_media_types.cpp +++ b/Telegram/SourceFiles/history/history_media_types.cpp @@ -3010,6 +3010,10 @@ TextWithEntities HistoryWebPage::selectedText(TextSelection selection) const { return titleResult; } +bool HistoryWebPage::hasReplyPreview() const { + return _attach ? _attach->hasReplyPreview() : (_data->photo ? true : false); +} + ImagePtr HistoryWebPage::replyPreview() { return _attach ? _attach->replyPreview() : (_data->photo ? _data->photo->makeReplyPreview() : ImagePtr()); } diff --git a/Telegram/SourceFiles/history/history_media_types.h b/Telegram/SourceFiles/history/history_media_types.h index c8f16e82b2..61b2b9e3c7 100644 --- a/Telegram/SourceFiles/history/history_media_types.h +++ b/Telegram/SourceFiles/history/history_media_types.h @@ -726,9 +726,7 @@ public: void attachToParent() override; void detachFromParent() override; - bool hasReplyPreview() const override { - return (_data->photo && !_data->photo->thumb->isNull()) || (_data->document && !_data->document->thumb->isNull()); - } + bool hasReplyPreview() const override; ImagePtr replyPreview() override; WebPageData *webpage() {