mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Update API scheme on layer 187.
This commit is contained in:
parent
437d8ea890
commit
267a73f355
4 changed files with 17 additions and 16 deletions
|
@ -639,20 +639,21 @@ void Boosts::requestBoosts(
|
|||
}
|
||||
: Data::GiftCodeLink();
|
||||
list.push_back({
|
||||
qs(data.vid()),
|
||||
data.vuser_id().value_or_empty(),
|
||||
data.vgiveaway_msg_id()
|
||||
.id = qs(data.vid()),
|
||||
.userId = UserId(data.vuser_id().value_or_empty()),
|
||||
.giveawayMessage = data.vgiveaway_msg_id()
|
||||
? FullMsgId{ _peer->id, data.vgiveaway_msg_id()->v }
|
||||
: FullMsgId(),
|
||||
QDateTime::fromSecsSinceEpoch(data.vdate().v),
|
||||
QDateTime::fromSecsSinceEpoch(data.vexpires().v),
|
||||
(data.vexpires().v - data.vdate().v) / kMonthsDivider,
|
||||
std::move(giftCodeLink),
|
||||
data.vmultiplier().value_or_empty(),
|
||||
data.is_gift(),
|
||||
data.is_giveaway(),
|
||||
data.is_unclaimed(),
|
||||
data.is_stars(),
|
||||
.date = QDateTime::fromSecsSinceEpoch(data.vdate().v),
|
||||
.expiresAt = QDateTime::fromSecsSinceEpoch(data.vexpires().v),
|
||||
.expiresAfterMonths = ((data.vexpires().v - data.vdate().v)
|
||||
/ kMonthsDivider),
|
||||
.giftCodeLink = std::move(giftCodeLink),
|
||||
.multiplier = data.vmultiplier().value_or_empty(),
|
||||
.credits = data.vstars().value_or_empty(),
|
||||
.isGift = data.is_gift(),
|
||||
.isGiveaway = data.is_giveaway(),
|
||||
.isUnclaimed = data.is_unclaimed(),
|
||||
});
|
||||
}
|
||||
done(Data::BoostsListSlice{
|
||||
|
|
|
@ -35,11 +35,11 @@ struct Boost final {
|
|||
int expiresAfterMonths = 0;
|
||||
GiftCodeLink giftCodeLink;
|
||||
int multiplier = 0;
|
||||
uint64 credits = 0;
|
||||
|
||||
bool isGift = false;
|
||||
bool isGiveaway = false;
|
||||
bool isUnclaimed = false;
|
||||
bool isCredits = false;
|
||||
};
|
||||
|
||||
struct BoostsListSlice final {
|
||||
|
|
|
@ -520,7 +520,7 @@ void BoostRow::init() {
|
|||
Rect(x, y, Size(size)));
|
||||
};
|
||||
}
|
||||
if (_boost.isCredits) {
|
||||
if (_boost.credits) {
|
||||
const auto copy = base::duplicate(_paintUserpicCallback);
|
||||
const auto badgeSize = st::boostsListCreditsIconSize;
|
||||
const auto drawCredits = Ui::PaintOutlinedColoredCreditsIconCallback(
|
||||
|
|
|
@ -1641,9 +1641,9 @@ payments.giveawayInfo#4367daa0 flags:# participating:flags.0?true preparing_resu
|
|||
payments.giveawayInfoResults#e175e66f flags:# winner:flags.0?true refunded:flags.1?true start_date:int gift_code_slug:flags.3?string stars_prize:flags.4?long finish_date:int winners_count:int activated_count:flags.2?int = payments.GiveawayInfo;
|
||||
|
||||
prepaidGiveaway#b2539d54 id:long months:int quantity:int date:int = PrepaidGiveaway;
|
||||
prepaidStarsGiveaway#8a6044fd id:long stars:long quantity:int date:int = PrepaidGiveaway;
|
||||
prepaidStarsGiveaway#9a9d77e0 id:long stars:long quantity:int boosts:int date:int = PrepaidGiveaway;
|
||||
|
||||
boost#2a1c8c71 flags:# gift:flags.1?true giveaway:flags.2?true unclaimed:flags.3?true stars:flags.6?true id:string user_id:flags.0?long giveaway_msg_id:flags.2?int date:int expires:int used_gift_slug:flags.4?string multiplier:flags.5?int = Boost;
|
||||
boost#4b3e14d6 flags:# gift:flags.1?true giveaway:flags.2?true unclaimed:flags.3?true id:string user_id:flags.0?long giveaway_msg_id:flags.2?int date:int expires:int used_gift_slug:flags.4?string multiplier:flags.5?int stars:flags.6?long = Boost;
|
||||
|
||||
premium.boostsList#86f8613c flags:# count:int boosts:Vector<Boost> next_offset:flags.0?string users:Vector<User> = premium.BoostsList;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue