2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 23:55:12 +00:00

Generate previews for cloud theme links.

This commit is contained in:
John Preston
2019-09-09 14:56:05 +03:00
parent 6d29dc3b36
commit ee5423762a
20 changed files with 193 additions and 80 deletions

View File

@@ -650,6 +650,7 @@ void DocumentData::validateGoodThumbnail() {
if (!isVideoFile()
&& !isAnimation()
&& !isWallPaper()
&& !isTheme()
&& (!sticker() || !sticker()->animated)) {
_goodThumbnail = nullptr;
} else if (!_goodThumbnail && hasRemoteLocation()) {
@@ -1470,7 +1471,8 @@ bool DocumentData::isGifv() const {
bool DocumentData::isTheme() const {
return
_filename.endsWith(
_mimeString == qstr("application/x-tgtheme-tdesktop")
|| _filename.endsWith(
qstr(".tdesktop-theme"),
Qt::CaseInsensitive)
|| _filename.endsWith(