2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Correctly show commission in stars stats.

This commit is contained in:
John Preston
2024-11-29 22:13:16 +04:00
parent 552dd318cd
commit b401c37c39
11 changed files with 75 additions and 11 deletions

View File

@@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "history/history_item.h"
#include "history/history_item_components.h" // HistoryServicePaymentRefund.
#include "info/bot/starref/info_bot_starref_common.h"
#include "info/channel_statistics/boosts/giveaway/boost_badge.h" // InfiniteRadialAnimationWidget.
#include "info/settings/info_settings_widget.h" // SectionCustomTopBarData.
#include "info/statistics/info_statistics_list_controllers.h"
@@ -1012,6 +1013,11 @@ void ReceiptCreditsBox(
? tr::lng_credits_box_history_entry_subscription(tr::now)
: !e.title.isEmpty()
? e.title
: e.starrefCommission
? tr::lng_credits_commission(
tr::now,
lt_amount,
Info::BotStarRef::FormatCommission(e.starrefCommission))
: e.soldOutInfo
? tr::lng_credits_box_history_entry_gift_unavailable(tr::now)
: sentStarGift