mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Correctly show commission in stars stats.
This commit is contained in:
@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_photo_media.h"
|
||||
#include "data/data_session.h"
|
||||
#include "history/view/media/history_view_sticker_player.h"
|
||||
#include "info/bot/starref/info_bot_starref_common.h"
|
||||
#include "info/userpic/info_userpic_emoji_builder_preview.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "main/main_session.h"
|
||||
@@ -545,7 +546,15 @@ Fn<PaintRoundImageCallback(Fn<void()>)> PaintPreviewCallback(
|
||||
}
|
||||
|
||||
TextWithEntities GenerateEntryName(const Data::CreditsHistoryEntry &entry) {
|
||||
return (entry.floodSkip
|
||||
return (entry.starrefCommission && !entry.starrefAmount)
|
||||
? tr::lng_credits_commission(
|
||||
tr::now,
|
||||
lt_amount,
|
||||
TextWithEntities{
|
||||
Info::BotStarRef::FormatCommission(entry.starrefCommission)
|
||||
},
|
||||
TextWithEntities::Simple)
|
||||
: (entry.floodSkip
|
||||
? tr::lng_credits_box_history_entry_api
|
||||
: entry.reaction
|
||||
? tr::lng_credits_box_history_entry_reaction_name
|
||||
|
Reference in New Issue
Block a user