2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Fixed expiration date of boosts in boosts list.

This commit is contained in:
23rd
2023-11-08 23:54:52 +03:00
parent 282c076931
commit 33cf9a0702
4 changed files with 10 additions and 14 deletions

View File

@@ -587,6 +587,7 @@ void Boosts::requestBoosts(
auto list = std::vector<Data::Boost>();
list.reserve(data.vboosts().v.size());
constexpr auto kMonthsDivider = int(30 * 86400);
for (const auto &boost : data.vboosts().v) {
const auto &data = boost.data();
const auto path = data.vused_gift_slug()
@@ -609,7 +610,8 @@ void Boosts::requestBoosts(
? FullMsgId{ _peer->id, data.vgiveaway_msg_id()->v }
: FullMsgId(),
QDateTime::fromSecsSinceEpoch(data.vdate().v),
data.vexpires().v,
QDateTime::fromSecsSinceEpoch(data.vexpires().v),
(data.vexpires().v - data.vdate().v) / kMonthsDivider,
std::move(giftCodeLink),
data.vmultiplier().value_or_empty(),
});