2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

Update scheme, new sticker categories.

This commit is contained in:
John Preston
2024-04-30 22:30:39 +04:00
parent 63e1731d7c
commit bb6fd4bc4d
13 changed files with 238 additions and 30 deletions

View File

@@ -307,16 +307,17 @@ std::unique_ptr<Ui::TabbedSearch> MakeSearch(
const style::EmojiPan &st,
Fn<void(std::vector<QString>&&)> callback,
not_null<Main::Session*> session,
bool statusCategories,
bool profilePhotoCategories) {
TabbedSearchType type) {
using Descriptor = Ui::SearchDescriptor;
const auto owner = &session->data();
auto result = std::make_unique<Ui::TabbedSearch>(parent, st, Descriptor{
.st = st.search,
.groups = (profilePhotoCategories
.groups = ((type == TabbedSearchType::ProfilePhoto)
? owner->emojiStatuses().profilePhotoGroupsValue()
: statusCategories
: (type == TabbedSearchType::Status)
? owner->emojiStatuses().statusGroupsValue()
: (type == TabbedSearchType::Stickers)
? owner->emojiStatuses().stickerGroupsValue()
: owner->emojiStatuses().emojiGroupsValue()),
.customEmojiFactory = owner->customEmojiManager().factory(
Data::CustomEmojiManager::SizeTag::SetIcon,