mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 17:06:03 +00:00
Preload stories in the sources lists.
This commit is contained in:
@@ -2542,14 +2542,14 @@ void SessionController::openPeerStories(
|
||||
|
||||
auto &stories = session().data().stories();
|
||||
if (const auto source = stories.source(peerId)) {
|
||||
const auto j = source->ids.lower_bound(
|
||||
StoryIdDates{ source->readTill + 1 });
|
||||
openPeerStory(
|
||||
source->user,
|
||||
j != source->ids.end() ? j->id : source->ids.front().id,
|
||||
(list
|
||||
? StoriesContext{ *list }
|
||||
: StoriesContext{ StoriesContextPeer() }));
|
||||
if (const auto idDates = source->toOpen()) {
|
||||
openPeerStory(
|
||||
source->user,
|
||||
idDates.id,
|
||||
(list
|
||||
? StoriesContext{ *list }
|
||||
: StoriesContext{ StoriesContextPeer() }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user