mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Slightly improved timestamp parsing in Api::Boosts.
This commit is contained in:
parent
267a73f355
commit
9efd9b0d68
1 changed files with 3 additions and 4 deletions
|
@ -576,8 +576,7 @@ rpl::producer<rpl::no_value, QString> Boosts::request() {
|
|||
.months = data.vmonths().v,
|
||||
.id = data.vid().v,
|
||||
.quantity = data.vquantity().v,
|
||||
.date = QDateTime::fromSecsSinceEpoch(
|
||||
data.vdate().v),
|
||||
.date = base::unixtime::parse(data.vdate().v),
|
||||
};
|
||||
}, [&](const MTPDprepaidStarsGiveaway &data) {
|
||||
return Data::BoostPrepaidGiveaway(AssertIsDebug());
|
||||
|
@ -644,8 +643,8 @@ void Boosts::requestBoosts(
|
|||
.giveawayMessage = data.vgiveaway_msg_id()
|
||||
? FullMsgId{ _peer->id, data.vgiveaway_msg_id()->v }
|
||||
: FullMsgId(),
|
||||
.date = QDateTime::fromSecsSinceEpoch(data.vdate().v),
|
||||
.expiresAt = QDateTime::fromSecsSinceEpoch(data.vexpires().v),
|
||||
.date = base::unixtime::parse(data.vdate().v),
|
||||
.expiresAt = base::unixtime::parse(data.vexpires().v),
|
||||
.expiresAfterMonths = ((data.vexpires().v - data.vdate().v)
|
||||
/ kMonthsDivider),
|
||||
.giftCodeLink = std::move(giftCodeLink),
|
||||
|
|
Loading…
Add table
Reference in a new issue