mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Use new HistoryWallPaper media type for wallpaper.
This commit is contained in:
@@ -593,6 +593,7 @@ bool DocumentData::checkWallPaperProperties() {
|
||||
return false;
|
||||
}
|
||||
type = WallPaperDocument;
|
||||
validateGoodThumbnail();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -615,6 +616,10 @@ bool DocumentData::isWallPaper() const {
|
||||
return (type == WallPaperDocument);
|
||||
}
|
||||
|
||||
bool DocumentData::isPatternWallPaper() const {
|
||||
return isWallPaper() && hasMimeType(qstr("image/png"));
|
||||
}
|
||||
|
||||
bool DocumentData::hasThumbnail() const {
|
||||
return !_thumbnail->isNull();
|
||||
}
|
||||
@@ -642,7 +647,7 @@ Image *DocumentData::goodThumbnail() const {
|
||||
}
|
||||
|
||||
void DocumentData::validateGoodThumbnail() {
|
||||
if (!isVideoFile() && !isAnimation()) {
|
||||
if (!isVideoFile() && !isAnimation() && !isWallPaper()) {
|
||||
_goodThumbnail = nullptr;
|
||||
} else if (!_goodThumbnail && hasRemoteLocation()) {
|
||||
_goodThumbnail = std::make_unique<Image>(
|
||||
|
Reference in New Issue
Block a user