2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Track inbox/outbox comments/replies read state.

This commit is contained in:
John Preston
2020-09-22 14:01:49 +03:00
parent e021e0beb3
commit 13ad590a51
10 changed files with 257 additions and 192 deletions

View File

@@ -145,14 +145,26 @@ void SessionNavigation::showRepliesForMessage(
item = group->items.front();
}
if (item) {
if (const auto maxId = data.vmax_id()) {
item->setRepliesMaxId(maxId->v);
}
if (const auto readTill = data.vread_inbox_max_id()) {
item->setRepliesInboxReadTill(readTill->v);
}
if (const auto readTill = data.vread_outbox_max_id()) {
item->setRepliesOutboxReadTill(readTill->v);
}
const auto post = _session->data().message(channelId, rootId);
if (post) {
post->setCommentsItemId(item->fullId());
if (const auto maxId = data.vmax_id()) {
post->setCommentsMaxId(maxId->v);
post->setRepliesMaxId(maxId->v);
}
if (const auto readTill = data.vread_inbox_max_id()) {
post->setCommentsReadTill(readTill->v);
post->setRepliesInboxReadTill(readTill->v);
}
if (const auto readTill = data.vread_outbox_max_id()) {
post->setRepliesOutboxReadTill(readTill->v);
}
}
showSection(