From 1695bdd63ca4adda9db53eb578236fc9b847e2d0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 9 Feb 2026 16:52:46 +0400 Subject: [PATCH] Fix crafted gift number in result display. --- Telegram/SourceFiles/boxes/star_gift_craft_animation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/star_gift_craft_animation.cpp b/Telegram/SourceFiles/boxes/star_gift_craft_animation.cpp index c2d3038cf1..e901ec135c 100644 --- a/Telegram/SourceFiles/boxes/star_gift_craft_animation.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_craft_animation.cpp @@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/view/media/history_view_sticker_player.h" #include "info/peer_gifts/info_peer_gifts_common.h" #include "lang/lang_keys.h" +#include "lang/lang_tag.h" #include "lottie/lottie_common.h" #include "lottie/lottie_icon.h" #include "main/main_session.h" @@ -1963,13 +1964,17 @@ void StartCraftAnimation( using Result = std::shared_ptr; state->craftResult = v::get(result); if (const auto result = state->craftResult->get()) { + auto numberText = (result->info.unique && result->info.unique->number > 0) + ? rpl::single(u"#"_q + Lang::FormatCountDecimal(result->info.unique->number)) + : rpl::producer(); + state->successAnimation = std::make_unique< CraftDoneAnimation >(CraftDoneAnimation{ .owned = MakeUniqueGiftCover( container, rpl::single(UniqueGiftCover{ *result->info.unique }), - {}), + { .numberText = std::move(numberText) }), }); const auto success = state->successAnimation.get();