mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fixed display of message without text in section of shared links.
This commit is contained in:
@@ -1726,6 +1726,10 @@ MediaWebPageFlags MediaWebPage::webpageFlags() const {
|
||||
return _flags;
|
||||
}
|
||||
|
||||
Storage::SharedMediaTypesMask MediaWebPage::sharedMediaTypes() const {
|
||||
return Storage::SharedMediaType::Link;
|
||||
}
|
||||
|
||||
bool MediaWebPage::hasReplyPreview() const {
|
||||
if (const auto document = MediaWebPage::document()) {
|
||||
return document->hasThumbnail()
|
||||
|
||||
@@ -446,6 +446,8 @@ public:
|
||||
WebPageData *webpage() const override;
|
||||
MediaWebPageFlags webpageFlags() const override;
|
||||
|
||||
Storage::SharedMediaTypesMask sharedMediaTypes() const override;
|
||||
|
||||
bool hasReplyPreview() const override;
|
||||
Image *replyPreview() const override;
|
||||
bool replyPreviewLoaded() const override;
|
||||
|
||||
@@ -1638,6 +1638,17 @@ Link::Link(
|
||||
}
|
||||
_links.push_back(LinkEntry(url, entityText));
|
||||
}
|
||||
if (_links.empty()) {
|
||||
if (const auto media = parent->media()) {
|
||||
if (const auto webpage = media->webpage()) {
|
||||
if (!webpage->displayUrl.isEmpty()
|
||||
&& !webpage->url.isEmpty()) {
|
||||
_links.push_back(
|
||||
LinkEntry(webpage->displayUrl, webpage->url));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (lnk > 0 && till > from) {
|
||||
--lnk;
|
||||
auto &entity = entities.at(lnk);
|
||||
|
||||
Reference in New Issue
Block a user