mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Added initial api support of refund flag to credits history entries.
This commit is contained in:
parent
be099880d8
commit
ebaffc333e
3 changed files with 12 additions and 0 deletions
|
@ -52,6 +52,7 @@ namespace {
|
|||
}, [](const MTPDstarsTransactionPeerPremiumBot &) {
|
||||
return Data::CreditsHistoryEntry::PeerType::PremiumBot;
|
||||
}),
|
||||
.refunded = tl.data().is_refund(),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ struct CreditsHistoryEntry final {
|
|||
uint64 credits = 0;
|
||||
uint64 bareId = 0;
|
||||
PeerType peerType;
|
||||
bool refunded = false;
|
||||
};
|
||||
|
||||
struct CreditsStatusSlice final {
|
||||
|
|
|
@ -473,6 +473,16 @@ void ReceiptCreditsBox(
|
|||
st::defaultFlatLabel)));
|
||||
}
|
||||
|
||||
if (e.refunded) {
|
||||
Ui::AddSkip(content);
|
||||
box->addRow(object_ptr<Ui::CenterWrap<>>(
|
||||
box,
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
box,
|
||||
tr::lng_channel_earn_history_return_about(),
|
||||
st::defaultFlatLabel)));
|
||||
}
|
||||
|
||||
Ui::AddSkip(content);
|
||||
Ui::AddSkip(content);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue