mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
parent
741b524d71
commit
19350e3846
4 changed files with 8 additions and 1 deletions
|
@ -144,6 +144,8 @@ WebPageType ParseWebPageType(
|
|||
return WebPageType::Video;
|
||||
} else if (type == u"photo"_q) {
|
||||
return WebPageType::Photo;
|
||||
} else if (type == u"document"_q) {
|
||||
return WebPageType::Document;
|
||||
} else if (type == u"profile"_q) {
|
||||
return WebPageType::Profile;
|
||||
} else if (type == u"telegram_background"_q) {
|
||||
|
|
|
@ -26,6 +26,7 @@ enum class WebPageType {
|
|||
|
||||
Photo,
|
||||
Video,
|
||||
Document,
|
||||
|
||||
User,
|
||||
Bot,
|
||||
|
|
|
@ -166,6 +166,7 @@ QSize WebPage::countOptimalSize() {
|
|||
} else if (!_data->document
|
||||
&& _data->photo
|
||||
&& _data->type != WebPageType::Photo
|
||||
&& _data->type != WebPageType::Document
|
||||
&& _data->type != WebPageType::Video) {
|
||||
if (_data->type == WebPageType::Profile) {
|
||||
_asArticle = true;
|
||||
|
@ -755,6 +756,7 @@ ClickHandlerPtr WebPage::replaceAttachLink(
|
|||
|| _data->type == WebPageType::Video) {
|
||||
return _openl;
|
||||
} else if (_data->type == WebPageType::Photo
|
||||
|| _data->type == WebPageType::Document
|
||||
|| _data->siteName == u"Twitter"_q
|
||||
|| _data->siteName == u"Facebook"_q) {
|
||||
// leave photo link
|
||||
|
|
|
@ -1610,9 +1610,11 @@ Link::Link(
|
|||
}),
|
||||
parent->fullId());
|
||||
} else if (_page->photo) {
|
||||
if (_page->type == WebPageType::Profile || _page->type == WebPageType::Video) {
|
||||
if (_page->type == WebPageType::Profile
|
||||
|| _page->type == WebPageType::Video) {
|
||||
_photol = createHandler(_page->url);
|
||||
} else if (_page->type == WebPageType::Photo
|
||||
|| _page->type == WebPageType::Document
|
||||
|| _page->siteName == u"Twitter"_q
|
||||
|| _page->siteName == u"Facebook"_q) {
|
||||
_photol = std::make_shared<PhotoOpenClickHandler>(
|
||||
|
|
Loading…
Add table
Reference in a new issue