mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix WebPage reply preview.
Sometimes HistoryWebPage::hasReplyPreview() was returning true while the HistoryWebPage::replyPreview() method was not offering anything.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user