Improved unloading heavy part from MediaGeneric for gift's backgrounds.

This commit is contained in:
23rd
2025-11-20 19:24:19 +03:00
parent af63d86e24
commit 8c1844b1c0
4 changed files with 30 additions and 13 deletions

View File

@@ -2616,7 +2616,9 @@ std::unique_ptr<HistoryView::Media> MediaGiftBox::createView(
HistoryView::GenerateUniqueGiftMedia(message, replacing, unique),
HistoryView::MediaGenericDescriptor{
.maxWidth = st::msgServiceGiftBoxSize.width(),
.paintBg = HistoryView::UniqueGiftBg(message, unique),
.paintBgFactory = [=] {
return HistoryView::UniqueGiftBg(message, unique);
},
.service = true,
});
}