mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Added initial api support of refund flag to credits history entries.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user