mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +00:00
Resolve unknown story on open.
This commit is contained in:
@@ -2522,9 +2522,15 @@ void SessionController::openPeerStory(
|
||||
using namespace Media::View;
|
||||
using namespace Data;
|
||||
|
||||
invalidate_weak_ptrs(&_storyOpenGuard);
|
||||
auto &stories = session().data().stories();
|
||||
if (const auto from = stories.lookup({ peer->id, storyId })) {
|
||||
const auto from = stories.lookup({ peer->id, storyId });
|
||||
if (from) {
|
||||
window().openInMediaView(OpenRequest(this, *from, context));
|
||||
} else if (from.error() == Data::NoStory::Unknown) {
|
||||
stories.resolve({ peer->id, storyId }, crl::guard(&_storyOpenGuard, [=] {
|
||||
openPeerStory(peer, storyId, context);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user