Fix WebPage reply preview.
Sometimes HistoryWebPage::hasReplyPreview() was returning true while the HistoryWebPage::replyPreview() method was not offering anything.
This commit is contained in:
parent
bd121752f1
commit
743743ca10
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue