mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 18:21:42 -05:00
Show webpage with embed_url as a video.
This commit is contained in:
parent
fd538bc6c8
commit
2ebbf062d0
1 changed files with 13 additions and 7 deletions
|
@ -130,13 +130,19 @@ WebPageCollage ExtractCollage(const MTPDwebPage &data) {
|
|||
|
||||
WebPageType ParseWebPageType(const MTPDwebPage &page) {
|
||||
const auto type = page.has_type() ? qs(page.vtype) : QString();
|
||||
if (type == qstr("photo")) return WebPageType::Photo;
|
||||
if (type == qstr("video")) return WebPageType::Video;
|
||||
if (type == qstr("profile")) return WebPageType::Profile;
|
||||
if (type == qstr("telegram_background")) return WebPageType::WallPaper;
|
||||
return page.has_cached_page()
|
||||
? WebPageType::ArticleWithIV
|
||||
: WebPageType::Article;
|
||||
if (type == qstr("video") || page.has_embed_url()) {
|
||||
return WebPageType::Video;
|
||||
} else if (type == qstr("photo")) {
|
||||
return WebPageType::Photo;
|
||||
} else if (type == qstr("profile")) {
|
||||
return WebPageType::Profile;
|
||||
} else if (type == qstr("telegram_background")) {
|
||||
return WebPageType::WallPaper;
|
||||
} else if (page.has_cached_page()) {
|
||||
return WebPageType::ArticleWithIV;
|
||||
} else {
|
||||
return WebPageType::Article;
|
||||
}
|
||||
}
|
||||
|
||||
WebPageCollage::WebPageCollage(const MTPDwebPage &data)
|
||||
|
|
Loading…
Add table
Reference in a new issue