2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Setting for cloud stickers suggestions.

This commit is contained in:
John Preston
2018-03-19 20:32:33 +04:00
parent 3406f88fdc
commit 4a32b00068
7 changed files with 39 additions and 14 deletions

View File

@@ -783,9 +783,9 @@ std::vector<not_null<DocumentData*>> GetListByEmoji(
addList(
Auth().data().stickerSetsOrder(),
MTPDstickerSet::Flag::f_archived);
addList(
Auth().data().featuredStickerSetsOrder(),
MTPDstickerSet::Flag::f_installed_date);
//addList(
// Auth().data().featuredStickerSetsOrder(),
// MTPDstickerSet::Flag::f_installed_date);
if (!setsToRequest.empty()) {
for (const auto [setId, accessHash] : setsToRequest) {
@@ -794,13 +794,15 @@ std::vector<not_null<DocumentData*>> GetListByEmoji(
Auth().api().requestStickerSets();
}
const auto others = Auth().api().stickersByEmoji(original);
if (!others) {
return {};
}
result.reserve(result.size() + others->size());
for (const auto document : *others) {
add(document, CreateOtherSortKey(document));
if (Global::SuggestStickersByEmoji()) {
const auto others = Auth().api().stickersByEmoji(original);
if (!others) {
return {};
}
result.reserve(result.size() + others->size());
for (const auto document : *others) {
add(document, CreateOtherSortKey(document));
}
}
ranges::action::sort(