2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Handle t.me/bg links with wallpapers / colors.

This commit is contained in:
John Preston
2019-01-17 12:18:23 +04:00
parent e59a68cd68
commit 1894b8fcf7
34 changed files with 805 additions and 194 deletions

View File

@@ -133,7 +133,7 @@ WebPageType ParseWebPageType(const MTPDwebPage &page) {
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_wallpaper")) return WebPageType::WallPaper;
if (type == qstr("telegram_background")) return WebPageType::WallPaper;
return page.has_cached_page()
? WebPageType::ArticleWithIV
: WebPageType::Article;
@@ -218,7 +218,7 @@ bool WebPageData::applyChanges(
pendingTill = newPendingTill;
++version;
if (type == WebPageType::WallPaper) {
if (type == WebPageType::WallPaper && document) {
document->checkWallPaperProperties();
}