mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Respect gift privacy for resell gifts.
This commit is contained in:
parent
8b5a00ca27
commit
ddfab824c3
1 changed files with 4 additions and 2 deletions
|
@ -931,7 +931,9 @@ void PreviewWrap::paintEvent(QPaintEvent *e) {
|
||||||
const auto allowLimited = !(disallowedTypes & Type::Limited);
|
const auto allowLimited = !(disallowedTypes & Type::Limited);
|
||||||
const auto allowUnlimited = !(disallowedTypes & Type::Unlimited);
|
const auto allowUnlimited = !(disallowedTypes & Type::Unlimited);
|
||||||
const auto allowUnique = !(disallowedTypes & Type::Unique);
|
const auto allowUnique = !(disallowedTypes & Type::Unique);
|
||||||
if (!gift.info.limitedCount) {
|
if (gift.resale) {
|
||||||
|
return allowUnique;
|
||||||
|
} else if (!gift.info.limitedCount) {
|
||||||
return allowUnlimited;
|
return allowUnlimited;
|
||||||
}
|
}
|
||||||
return allowLimited || (gift.info.starsToUpgrade && allowUnique);
|
return allowLimited || (gift.info.starsToUpgrade && allowUnique);
|
||||||
|
@ -1525,7 +1527,7 @@ struct GiftPriceTabs {
|
||||||
} else {
|
} else {
|
||||||
hasNonSoldOut = true;
|
hasNonSoldOut = true;
|
||||||
}
|
}
|
||||||
if (gift.info.starsResellMin) {
|
if (gift.resale) {
|
||||||
hasResale = true;
|
hasResale = true;
|
||||||
} else {
|
} else {
|
||||||
hasNonResale = true;
|
hasNonResale = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue