Inject discussed message in Replies section.

This commit is contained in:
John Preston 2020-09-15 14:46:54 +03:00
parent c2bb2526d3
commit 808e8dcf4f
1 changed files with 5 additions and 0 deletions

View File

@ -205,6 +205,11 @@ bool RepliesList::buildFromData(not_null<Viewer*> viewer) {
for (auto j = i - useAfter, e = i + useBefore; j != e; ++j) {
slice->ids.emplace_back(channelId, *j);
}
if (slice->skippedBefore == 0) {
if (const auto root = lookupRoot()) {
slice->ids.push_back(root->fullId());
}
}
ranges::reverse(slice->ids);
slice->fullCount = _fullCount.current();