mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Add read status tracking to comments.
This commit is contained in:
@@ -165,7 +165,14 @@ bool RepliesList::buildFromData(not_null<Viewer*> viewer) {
|
||||
= 0;
|
||||
return true;
|
||||
}
|
||||
const auto around = viewer->around;
|
||||
const auto around = [&] {
|
||||
if (viewer->around != ShowAtUnreadMsgId) {
|
||||
return viewer->around;
|
||||
} else if (const auto item = lookupRoot()) {
|
||||
return item->repliesReadTill();
|
||||
}
|
||||
return viewer->around;
|
||||
}();
|
||||
if (_list.empty()
|
||||
|| (!around && _skippedAfter != 0)
|
||||
|| (around > _list.front() && _skippedAfter != 0)
|
||||
@@ -251,6 +258,10 @@ Histories &RepliesList::histories() {
|
||||
return _history->owner().histories();
|
||||
}
|
||||
|
||||
HistoryItem *RepliesList::lookupRoot() {
|
||||
return _history->owner().message(_history->channelId(), _rootId);
|
||||
}
|
||||
|
||||
void RepliesList::loadAround(MsgId id) {
|
||||
if (_loadingAround && *_loadingAround == id) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user