2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Improve mixed stickerpacks support.

This commit is contained in:
John Preston
2024-03-16 10:58:07 +04:00
parent b1795f8c5a
commit 90e572c8b1
11 changed files with 117 additions and 42 deletions

View File

@@ -353,6 +353,7 @@ private:
int _perRow = 0;
QSize _singleSize;
TimeId _setInstallDate = TimeId(0);
StickerType _setThumbnailType = StickerType::Webp;
ImageWithLocation _setThumbnail;
const std::unique_ptr<Ui::PathShiftGradient> _pathGradient;
@@ -755,6 +756,8 @@ void StickerSetBox::Inner::gotSet(const MTPmessages_StickerSet &set) {
set,
thumb);
if (result.location.valid()) {
_setThumbnailType
= Data::ThumbnailTypeFromPhotoSize(thumb);
return result;
}
}
@@ -775,7 +778,7 @@ void StickerSetBox::Inner::gotSet(const MTPmessages_StickerSet &set) {
set->installDate = _setInstallDate;
set->stickers = _pack;
set->emoji = _emoji;
set->setThumbnail(_setThumbnail);
set->setThumbnail(_setThumbnail, _setThumbnailType);
}
});
}, [&](const MTPDmessages_stickerSetNotModified &data) {
@@ -855,7 +858,7 @@ void StickerSetBox::Inner::installDone(
}
const auto set = it->second.get();
set->thumbnailDocumentId = _setThumbnailDocumentId;
set->setThumbnail(_setThumbnail);
set->setThumbnail(_setThumbnail, _setThumbnailType);
set->stickers = _pack;
set->emoji = _emoji;