Fix custom reaction as a quick one.

This commit is contained in:
John Preston 2024-09-05 19:13:52 +04:00
parent b5098038d0
commit a97d5e80c7
1 changed files with 9 additions and 0 deletions

View File

@ -261,6 +261,15 @@ PossibleItemReactionsRef LookupPossibleReactions(
}
result.customAllowed = (allowed.type == AllowedReactionsType::All)
&& premiumPossible;
const auto favoriteId = reactions->favoriteId();
if (favoriteId.custom()
&& result.customAllowed
&& !ranges::contains(result.recent, favoriteId, &Reaction::id)) {
if (const auto temp = reactions->lookupTemporary(favoriteId)) {
result.recent.insert(begin(result.recent), temp);
}
}
}
if (!item->reactionsAreTags()) {
const auto toFront = [&](Data::ReactionId id) {