mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added ability to request credits subscriptions with missing balance.
This commit is contained in:
@@ -348,12 +348,15 @@ void CreditsHistory::request(
|
||||
|
||||
void CreditsHistory::requestSubscriptions(
|
||||
const Data::CreditsStatusSlice::OffsetToken &token,
|
||||
Fn<void(Data::CreditsStatusSlice)> done) {
|
||||
Fn<void(Data::CreditsStatusSlice)> done,
|
||||
bool missingBalance) {
|
||||
if (_requestId) {
|
||||
return;
|
||||
}
|
||||
_requestId = _api.request(MTPpayments_GetStarsSubscriptions(
|
||||
MTP_flags(0),
|
||||
MTP_flags(missingBalance
|
||||
? MTPpayments_getStarsSubscriptions::Flag::f_missing_balance
|
||||
: MTPpayments_getStarsSubscriptions::Flags(0)),
|
||||
_peer->isSelf() ? MTP_inputPeerSelf() : _peer->input,
|
||||
MTP_string(token)
|
||||
)).done([=](const MTPpayments_StarsStatus &result) {
|
||||
|
@@ -82,7 +82,8 @@ public:
|
||||
Fn<void(Data::CreditsStatusSlice)> done);
|
||||
void requestSubscriptions(
|
||||
const Data::CreditsStatusSlice::OffsetToken &token,
|
||||
Fn<void(Data::CreditsStatusSlice)> done);
|
||||
Fn<void(Data::CreditsStatusSlice)> done,
|
||||
bool missingBalance = false);
|
||||
|
||||
private:
|
||||
using HistoryTL = MTPpayments_GetStarsTransactions;
|
||||
|
Reference in New Issue
Block a user