2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Request correct saved/default reaction tags.

This commit is contained in:
John Preston
2024-01-04 11:47:59 +04:00
parent 9b43d204e2
commit 9aacff8b54
5 changed files with 227 additions and 14 deletions

View File

@@ -529,14 +529,22 @@ bool ShowReactPremiumError(
|| ranges::contains(item->chosenReactions(), id)
|| item->history()->peer->isBroadcast()) {
return false;
}
const auto &list = controller->session().data().reactions().list(
Data::Reactions::Type::Active);
const auto i = ranges::find(list, id, &Data::Reaction::id);
if (i == end(list) || !i->premium) {
if (!id.custom()) {
} else if (item->reactionsAreTags()) {
const auto &list = controller->session().data().reactions().list(
Data::Reactions::Type::Tags);
const auto i = ranges::find(list, id, &Data::Reaction::id);
if (i != end(list)) {
return false;
}
} else {
const auto &list = controller->session().data().reactions().list(
Data::Reactions::Type::Active);
const auto i = ranges::find(list, id, &Data::Reaction::id);
if (i == end(list) || !i->premium) {
if (!id.custom()) {
return false;
}
}
}
ShowPremiumPreviewBox(controller, PremiumPreview::InfiniteReactions);
return true;