mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Keep document byte data only in DocumentMedia.
This commit is contained in:
@@ -433,7 +433,7 @@ void BackgroundPreviewBox::prepare() {
|
||||
_paper.loadThumbnail();
|
||||
_paper.loadDocument();
|
||||
if (_paper.document() && _paper.document()->loading()) {
|
||||
_radial.start(_paper.document()->progress());
|
||||
_radial.start(_media->progress());
|
||||
}
|
||||
if (_paper.thumbnail() && !_paper.isPattern()) {
|
||||
createBlurCheckbox();
|
||||
@@ -636,7 +636,7 @@ void BackgroundPreviewBox::radialAnimationCallback(crl::time now) {
|
||||
const auto document = _paper.document();
|
||||
const auto wasAnimating = _radial.animating();
|
||||
const auto updated = _radial.update(
|
||||
document->progress(),
|
||||
_media->progress(),
|
||||
!document->loading(),
|
||||
now);
|
||||
if ((wasAnimating || _radial.animating())
|
||||
@@ -746,7 +746,7 @@ void BackgroundPreviewBox::checkLoadedDocument() {
|
||||
});
|
||||
};
|
||||
_generating = Data::ReadImageAsync(
|
||||
document,
|
||||
_media.get(),
|
||||
Window::Theme::ProcessBackgroundImage,
|
||||
generateCallback);
|
||||
}
|
||||
|
@@ -944,7 +944,9 @@ void StickersBox::Inner::paintRowThumbnail(
|
||||
|
||||
void StickersBox::Inner::validateLottieAnimation(not_null<Row*> set) {
|
||||
if (set->lottie
|
||||
|| !Stickers::HasLottieThumbnail(set->thumbnail, set->sticker)) {
|
||||
|| !Stickers::HasLottieThumbnail(
|
||||
set->thumbnail,
|
||||
set->stickerMedia.get())) {
|
||||
return;
|
||||
}
|
||||
auto player = Stickers::LottieThumbnail(
|
||||
|
Reference in New Issue
Block a user