mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-11 12:47:02 +00:00
Update API scheme on layer 187.
This commit is contained in:
parent
437d8ea890
commit
267a73f355
@ -639,20 +639,21 @@ void Boosts::requestBoosts(
|
|||||||
}
|
}
|
||||||
: Data::GiftCodeLink();
|
: Data::GiftCodeLink();
|
||||||
list.push_back({
|
list.push_back({
|
||||||
qs(data.vid()),
|
.id = qs(data.vid()),
|
||||||
data.vuser_id().value_or_empty(),
|
.userId = UserId(data.vuser_id().value_or_empty()),
|
||||||
data.vgiveaway_msg_id()
|
.giveawayMessage = data.vgiveaway_msg_id()
|
||||||
? FullMsgId{ _peer->id, data.vgiveaway_msg_id()->v }
|
? FullMsgId{ _peer->id, data.vgiveaway_msg_id()->v }
|
||||||
: FullMsgId(),
|
: FullMsgId(),
|
||||||
QDateTime::fromSecsSinceEpoch(data.vdate().v),
|
.date = QDateTime::fromSecsSinceEpoch(data.vdate().v),
|
||||||
QDateTime::fromSecsSinceEpoch(data.vexpires().v),
|
.expiresAt = QDateTime::fromSecsSinceEpoch(data.vexpires().v),
|
||||||
(data.vexpires().v - data.vdate().v) / kMonthsDivider,
|
.expiresAfterMonths = ((data.vexpires().v - data.vdate().v)
|
||||||
std::move(giftCodeLink),
|
/ kMonthsDivider),
|
||||||
data.vmultiplier().value_or_empty(),
|
.giftCodeLink = std::move(giftCodeLink),
|
||||||
data.is_gift(),
|
.multiplier = data.vmultiplier().value_or_empty(),
|
||||||
data.is_giveaway(),
|
.credits = data.vstars().value_or_empty(),
|
||||||
data.is_unclaimed(),
|
.isGift = data.is_gift(),
|
||||||
data.is_stars(),
|
.isGiveaway = data.is_giveaway(),
|
||||||
|
.isUnclaimed = data.is_unclaimed(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
done(Data::BoostsListSlice{
|
done(Data::BoostsListSlice{
|
||||||
|
@ -35,11 +35,11 @@ struct Boost final {
|
|||||||
int expiresAfterMonths = 0;
|
int expiresAfterMonths = 0;
|
||||||
GiftCodeLink giftCodeLink;
|
GiftCodeLink giftCodeLink;
|
||||||
int multiplier = 0;
|
int multiplier = 0;
|
||||||
|
uint64 credits = 0;
|
||||||
|
|
||||||
bool isGift = false;
|
bool isGift = false;
|
||||||
bool isGiveaway = false;
|
bool isGiveaway = false;
|
||||||
bool isUnclaimed = false;
|
bool isUnclaimed = false;
|
||||||
bool isCredits = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BoostsListSlice final {
|
struct BoostsListSlice final {
|
||||||
|
@ -520,7 +520,7 @@ void BoostRow::init() {
|
|||||||
Rect(x, y, Size(size)));
|
Rect(x, y, Size(size)));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (_boost.isCredits) {
|
if (_boost.credits) {
|
||||||
const auto copy = base::duplicate(_paintUserpicCallback);
|
const auto copy = base::duplicate(_paintUserpicCallback);
|
||||||
const auto badgeSize = st::boostsListCreditsIconSize;
|
const auto badgeSize = st::boostsListCreditsIconSize;
|
||||||
const auto drawCredits = Ui::PaintOutlinedColoredCreditsIconCallback(
|
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;
|
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;
|
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;
|
premium.boostsList#86f8613c flags:# count:int boosts:Vector<Boost> next_offset:flags.0?string users:Vector<User> = premium.BoostsList;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user