mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-24 06:22:59 +02:00
Added ability to request credits subscriptions with missing balance.
This commit is contained in:
parent
5886a07300
commit
eb3419f3fc
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue