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

Implement stories switching, photo "animation".

This commit is contained in:
John Preston
2023-05-07 00:20:21 +04:00
parent 027bd89e5b
commit 7717de19ab
13 changed files with 581 additions and 131 deletions

View File

@@ -179,7 +179,6 @@ StoryId Stories::generate(
32,
32
)) | rpl::start_with_next([&](SharedMediaResult &&result) {
stories.total = result.count.value_or(1);
if (!result.messageIds.contains(itemId)) {
result.messageIds.emplace(itemId);
}
@@ -214,6 +213,9 @@ StoryId Stories::generate(
}
}
}
stories.total = std::max(
result.count.value_or(1),
int(result.messageIds.size()));
const auto i = ranges::find(_all, stories.user, &StoriesList::user);
if (i != end(_all)) {
*i = std::move(stories);