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

Allow showing stories in different contexts.

This commit is contained in:
John Preston
2023-06-05 16:10:34 +04:00
parent e7c0385aea
commit b71d72ca7c
21 changed files with 231 additions and 112 deletions

View File

@@ -744,7 +744,13 @@ void Stories::resolve(FullStoryId id, Fn<void()> done) {
}
}
void Stories::loadAround(FullStoryId id) {
void Stories::loadAround(FullStoryId id, StoriesContext context) {
if (v::is<StoriesContextSingle>(context.data)) {
return;
} else if (v::is<StoriesContextSaved>(context.data)
|| v::is<StoriesContextArchive>(context.data)) {
return;
}
const auto i = _all.find(id.peer);
if (i == end(_all)) {
return;