Don't repeat premium stickers in fake-pack.
This commit is contained in:
parent
3165ef9f0b
commit
6fcafeff5b
|
@ -2042,8 +2042,12 @@ bool StickersListWidget::appendSet(
|
||||||
for (const auto &sticker : to.back().stickers) {
|
for (const auto &sticker : to.back().stickers) {
|
||||||
const auto document = sticker.document;
|
const auto document = sticker.document;
|
||||||
if (document->isPremiumSticker()) {
|
if (document->isPremiumSticker()) {
|
||||||
to[_premiumsIndex].stickers.push_back(Sticker{ document });
|
auto &set = to[_premiumsIndex];
|
||||||
++to[_premiumsIndex].count;
|
auto &list = set.stickers;
|
||||||
|
if (!ranges::contains(list, document, &Sticker::document)) {
|
||||||
|
list.push_back(Sticker{ document });
|
||||||
|
++set.count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue