Switched existing sticker pick to inline dropdown that excludes self.

This commit is contained in:
23rd
2026-04-13 16:42:15 +03:00
parent b51c0f1ee5
commit fc85b09e88
8 changed files with 58 additions and 120 deletions
@@ -213,6 +213,7 @@ StickersListWidget::StickersListWidget(
, _section(Section::Stickers)
, _isMasks(_mode == Mode::Masks)
, _isEffects(_mode == Mode::MessageEffects)
, _excludeSetId(descriptor.excludeSetId)
, _updateItemsTimer([=] { updateItems(); })
, _updateSetsTimer([=] { updateSets(); })
, _trendingAddBgOver(
@@ -2578,6 +2579,9 @@ bool StickersListWidget::appendSet(
uint64 setId,
bool externalLayout,
AppendSkip skip) {
if (_excludeSetId && setId == _excludeSetId) {
return false;
}
const auto &sets = session().data().stickers().sets();
auto it = sets.find(setId);
if (it == sets.cend()
@@ -84,6 +84,7 @@ struct StickersListDescriptor {
std::vector<StickerCustomRecentDescriptor> customRecentList;
const style::EmojiPan *st = nullptr;
ComposeFeatures features;
uint64 excludeSetId = 0;
};
class StickersListWidget final : public TabbedSelector::Inner {
@@ -419,6 +420,7 @@ private:
Section _section = Section::Stickers;
const bool _isMasks;
const bool _isEffects;
const uint64 _excludeSetId = 0;
base::Timer _updateItemsTimer;
base::Timer _updateSetsTimer;