mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added phrase for paid reactions of live stories to credits earn history.
This commit is contained in:
@@ -2958,6 +2958,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_credits_summary_history_entry_inner_in" = "In-App Purchase";
|
||||
"lng_credits_summary_balance" = "Balance";
|
||||
"lng_credits_commission" = "{amount} commission";
|
||||
"lng_credits_paid_messages_fee_live_reaction" = "Fee for Live Story Reaction";
|
||||
"lng_credits_paid_messages_fee#one" = "Fee for {count} Message";
|
||||
"lng_credits_paid_messages_fee#other" = "Fee for {count} Messages";
|
||||
"lng_credits_paid_messages_fee_about" = "You receive {percent} of the price that you charge for each incoming message. {link}";
|
||||
|
||||
@@ -40,6 +40,10 @@ struct CreditsHistoryEntry final {
|
||||
return !id.isEmpty();
|
||||
}
|
||||
|
||||
[[nodiscard]] bool isLiveStoryReaction() const {
|
||||
return paidMessagesCount && reaction && !bareMsgId;
|
||||
}
|
||||
|
||||
using PhotoId = uint64;
|
||||
enum class PeerType {
|
||||
Peer,
|
||||
|
||||
@@ -882,7 +882,9 @@ void CreditsRow::init() {
|
||||
const auto name = !isSpecial
|
||||
? PeerListRow::generateName()
|
||||
: Ui::GenerateEntryName(_entry).text;
|
||||
_name = _entry.paidMessagesCount
|
||||
_name = _entry.isLiveStoryReaction()
|
||||
? tr::lng_credits_paid_messages_fee_live_reaction(tr::now)
|
||||
: _entry.paidMessagesCount
|
||||
? tr::lng_credits_paid_messages_fee(
|
||||
tr::now,
|
||||
lt_count,
|
||||
|
||||
@@ -1475,6 +1475,8 @@ void GenericCreditsEntryBox(
|
||||
? tr::lng_credits_box_history_entry_giveaway_name(tr::now)
|
||||
: (!e.subscriptionUntil.isNull() && e.title.isEmpty())
|
||||
? tr::lng_credits_box_history_entry_subscription(tr::now)
|
||||
: e.isLiveStoryReaction()
|
||||
? tr::lng_credits_paid_messages_fee_live_reaction(tr::now)
|
||||
: e.paidMessagesCount
|
||||
? tr::lng_credits_paid_messages_fee(
|
||||
tr::now,
|
||||
|
||||
@@ -569,6 +569,10 @@ TextWithEntities GenerateEntryName(const Data::CreditsHistoryEntry &entry) {
|
||||
Info::BotStarRef::FormatCommission(entry.starrefCommission)
|
||||
},
|
||||
TextWithEntities::Simple)
|
||||
: entry.isLiveStoryReaction()
|
||||
? tr::lng_credits_paid_messages_fee_live_reaction(
|
||||
tr::now,
|
||||
TextWithEntities::Simple)
|
||||
: entry.paidMessagesCount
|
||||
? tr::lng_credits_paid_messages_fee(
|
||||
tr::now,
|
||||
|
||||
Reference in New Issue
Block a user