2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix expire calculations for the stories.

This commit is contained in:
John Preston
2023-06-08 11:11:07 +04:00
parent 5e5b252f2f
commit 087c27c5e0
3 changed files with 9 additions and 10 deletions

View File

@@ -552,7 +552,7 @@ Story *Stories::parseAndApply(
return nullptr;
}
const auto expires = data.vexpire_date().v;
const auto expired = (expires >= now);
const auto expired = (expires <= now);
if (expired && !data.is_pinned() && !peer->isSelf()) {
return nullptr;
}
@@ -618,7 +618,7 @@ StoryIdDates Stories::parseAndApply(
return StoryIdDates();
}, [&](const MTPDstoryItemSkipped &data) {
const auto expires = data.vexpire_date().v;
const auto expired = (expires >= now);
const auto expired = (expires <= now);
const auto fullId = FullStoryId{ peer->id, data.vid().v };
if (!expired) {
registerExpiring(expires, fullId);