2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +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

@@ -2467,13 +2467,13 @@ Ui::ChatThemeBackgroundData SessionController::backgroundData(
void SessionController::openPeerStory(
not_null<PeerData*> peer,
StoryId storyId,
Data::StorySourcesList list) {
Data::StoriesContext context) {
using namespace Media::View;
using namespace Data;
auto &stories = session().data().stories();
if (const auto from = stories.lookup({ peer->id, storyId })) {
window().openInMediaView(OpenRequest(this, *from, list));
window().openInMediaView(OpenRequest(this, *from, context));
}
}
@@ -2492,7 +2492,7 @@ void SessionController::openPeerStories(
openPeerStory(
i->second.user,
j != i->second.ids.end() ? j->id : i->second.ids.front().id,
list);
{ list });
}
}