From 71272ed2ecf2db49d9b60315a6b82576c3e1fb73 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Dec 2025 11:34:51 +0400 Subject: [PATCH] Improve view of finished auctions. --- Telegram/Resources/langs/lang.strings | 1 + .../peer_gifts/info_peer_gifts_common.cpp | 20 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 6d8407657a..ebacaa1fa7 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3692,6 +3692,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_gift_stars_premium" = "premium"; "lng_gift_stars_auction" = "auction"; "lng_gift_stars_auction_join" = "Join"; +"lng_gift_stars_auction_view" = "View"; "lng_gift_stars_your_left#one" = "{count} left"; "lng_gift_stars_your_left#other" = "{count} left"; "lng_gift_stars_your_finished" = "none left"; diff --git a/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_common.cpp b/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_common.cpp index c1315ab538..cc948c9e4e 100644 --- a/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_common.cpp +++ b/Telegram/SourceFiles/info/peer_gifts/info_peer_gifts_common.cpp @@ -232,7 +232,7 @@ void GiftButton::setDescriptor(const GiftDescriptor &descriptor, Mode mode) { tr::now, lt_amount, _delegate->ministar().append(' ' + starsText), - Ui::Text::WithEntities), + tr::marked), kMarkupTextOptions, _delegate->textContext()); } @@ -274,13 +274,11 @@ void GiftButton::setDescriptor(const GiftDescriptor &descriptor, Mode mode) { : (small() && unique && unique->starsForResale) ? Data::FormatGiftResaleAsked(*unique) : unique - ? tr::lng_gift_transfer_button( - tr::now, - Ui::Text::WithEntities) - : (data.info.auction() && !data.info.soldOut) - ? tr::lng_gift_stars_auction_join( - tr::now, - Ui::Text::WithEntities) + ? tr::lng_gift_transfer_button(tr::now, tr::marked) + : data.info.auction() + ? (data.info.soldOut + ? tr::lng_gift_stars_auction_view + : tr::lng_gift_stars_auction_join)(tr::now, tr::marked) : _delegate->star().append(' ' + format(data.info.stars))), kMarkupTextOptions, _delegate->textContext()); @@ -807,10 +805,10 @@ void GiftButton::paintEvent(QPaintEvent *e) { ? ('#' + QString::number(unique->number)) : data.resale ? tr::lng_gift_stars_resale(tr::now) - : (!unique && data.info.auction()) - ? tr::lng_gift_stars_auction(tr::now) : soldOut ? tr::lng_gift_stars_sold_out(tr::now) + : (!unique && data.info.auction()) + ? tr::lng_gift_stars_auction(tr::now) : (!data.userpic && !data.info.unique && data.info.requirePremium) @@ -1358,7 +1356,7 @@ void SelectGiftToUnpin( }); const auto label = Ui::SetButtonMarkedLabel( button, - tr::lng_context_unpin_from_top(Ui::Text::WithEntities), + tr::lng_context_unpin_from_top(tr::marked), &show->session(), st::creditsBoxButtonLabel, &st::giftTooManyPinnedBox.button.textFg);