Name crafted models correctly.

This commit is contained in:
John Preston
2026-02-04 10:29:13 +04:00
parent f96fe33747
commit b5cd717a8b
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -4277,6 +4277,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_auction_preview_models#one" = "This collectible features **{count}** unique model.";
"lng_auction_preview_models#other" = "This collectible features **{count}** unique models.";
"lng_auction_preview_models_button" = "Models";
"lng_auction_preview_crafted#one" = "This collectible features **{count}** crafted model.";
"lng_auction_preview_crafted#other" = "This collectible features **{count}** crafted models.";
"lng_auction_preview_backdrop" = "backdrop";
"lng_auction_preview_backdrops#one" = "This collectible features **{count}** unique backdrop.";
"lng_auction_preview_backdrops#other" = "This collectible features **{count}** unique backdrops.";
@@ -256,6 +256,8 @@ private:
int _visibleFrom = 0;
int _visibleTill = 0;
bool _craftedModels = false;
};
[[nodiscard]] QColor MakeOpaque(QColor color, QColor bg) {
@@ -979,6 +981,10 @@ AttributesList::AttributesList(
, _list(&_entries->list) {
_singleMin = _delegate->buttonSize();
_craftedModels = !attributes->models.empty()
&& (attributes->models.front().rarityType()
!= Data::UniqueGiftRarity::Default);
fill();
_tab.value(
@@ -1206,7 +1212,9 @@ void AttributesList::clicked(int index) {
void AttributesList::refreshAbout() {
auto text = [&] {
switch (_tab.current()) {
case Tab::Model: return tr::lng_auction_preview_models;
case Tab::Model: return _craftedModels
? tr::lng_auction_preview_crafted
: tr::lng_auction_preview_models;
case Tab::Pattern: return tr::lng_auction_preview_symbols;
case Tab::Backdrop: return tr::lng_auction_preview_backdrops;
}