mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Respect gift privacy for resell gifts.
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user