mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Show quantity of issued unique gifts.
This commit is contained in:
@@ -3326,6 +3326,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
"lng_gift_unique_backdrop" = "Backdrop";
|
"lng_gift_unique_backdrop" = "Backdrop";
|
||||||
"lng_gift_unique_symbol" = "Symbol";
|
"lng_gift_unique_symbol" = "Symbol";
|
||||||
"lng_gift_unique_rarity" = "Only {percent} of such collectibles have this attribute.";
|
"lng_gift_unique_rarity" = "Only {percent} of such collectibles have this attribute.";
|
||||||
|
"lng_gift_unique_availability_label" = "Quantity";
|
||||||
"lng_gift_unique_availability#one" = "{count} of {amount} issued";
|
"lng_gift_unique_availability#one" = "{count} of {amount} issued";
|
||||||
"lng_gift_unique_availability#other" = "{count} of {amount} issued";
|
"lng_gift_unique_availability#other" = "{count} of {amount} issued";
|
||||||
"lng_gift_unique_info" = "Gifted to {recipient} on {date}.";
|
"lng_gift_unique_info" = "Gifted to {recipient} on {date}.";
|
||||||
|
@@ -1487,10 +1487,15 @@ void AddStarGiftTable(
|
|||||||
auto amount = rpl::single(TextWithEntities{
|
auto amount = rpl::single(TextWithEntities{
|
||||||
Lang::FormatCountDecimal(entry.limitedCount)
|
Lang::FormatCountDecimal(entry.limitedCount)
|
||||||
});
|
});
|
||||||
|
const auto count = unique
|
||||||
|
? (entry.limitedCount - entry.limitedLeft)
|
||||||
|
: entry.limitedLeft;
|
||||||
AddTableRow(
|
AddTableRow(
|
||||||
table,
|
table,
|
||||||
tr::lng_gift_availability(),
|
(unique
|
||||||
((!unique && !entry.limitedLeft)
|
? tr::lng_gift_unique_availability_label()
|
||||||
|
: tr::lng_gift_availability()),
|
||||||
|
((!unique && !count)
|
||||||
? tr::lng_gift_availability_none(
|
? tr::lng_gift_availability_none(
|
||||||
lt_amount,
|
lt_amount,
|
||||||
std::move(amount),
|
std::move(amount),
|
||||||
@@ -1499,7 +1504,7 @@ void AddStarGiftTable(
|
|||||||
? tr::lng_gift_unique_availability
|
? tr::lng_gift_unique_availability
|
||||||
: tr::lng_gift_availability_left)(
|
: tr::lng_gift_availability_left)(
|
||||||
lt_count_decimal,
|
lt_count_decimal,
|
||||||
rpl::single(entry.limitedLeft * 1.),
|
rpl::single(count * 1.),
|
||||||
lt_amount,
|
lt_amount,
|
||||||
std::move(amount),
|
std::move(amount),
|
||||||
Ui::Text::WithEntities)));
|
Ui::Text::WithEntities)));
|
||||||
|
Reference in New Issue
Block a user