2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Request default and recent emoji statuses.

This commit is contained in:
John Preston
2022-08-30 19:21:14 +04:00
parent b2d72e2541
commit 923e725e18
15 changed files with 549 additions and 87 deletions

View File

@@ -38,7 +38,7 @@ constexpr auto kSizeForDownscale = 64;
constexpr auto kRecentRequestTimeout = 10 * crl::time(1000);
constexpr auto kRecentReactionsLimit = 40;
constexpr auto kTopRequestDelay = 60 * crl::time(1000);
constexpr auto kTopReactionsLimit = 10;
constexpr auto kTopReactionsLimit = 14;
[[nodiscard]] QString ReactionIdToLog(const ReactionId &id) {
if (const auto custom = id.custom()) {
@@ -107,7 +107,7 @@ PossibleItemReactionsRef LookupPossibleReactions(
}();
auto added = base::flat_set<ReactionId>();
const auto add = [&](auto predicate) {
auto &&all = ranges::views::concat(recent, top, full);
auto &&all = ranges::views::concat(top, recent, full);
for (const auto &reaction : all) {
if (predicate(reaction)) {
if (added.emplace(reaction.id).second) {