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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user