2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Support unread state in sublists.

This commit is contained in:
John Preston
2025-05-19 14:59:57 +04:00
parent 4bc5e81513
commit b2c01991a6
16 changed files with 1287 additions and 339 deletions

View File

@@ -2442,6 +2442,32 @@ void Updates::feedUpdate(const MTPUpdate &update) {
session().data().updateRepliesReadTill({ id, readTillId, true });
} break;
case mtpc_updateReadMonoForumInbox: {
const auto &d = update.c_updateReadMonoForumInbox();
const auto parentChatId = ChannelId(d.vchannel_id());
const auto sublistPeerId = peerFromMTP(d.vsaved_peer_id());
const auto readTillId = d.vread_max_id().v;
session().data().updateSublistReadTill({
parentChatId,
sublistPeerId,
readTillId,
false,
});
} break;
case mtpc_updateReadMonoForumOutbox: {
const auto &d = update.c_updateReadMonoForumOutbox();
const auto parentChatId = ChannelId(d.vchannel_id());
const auto sublistPeerId = peerFromMTP(d.vsaved_peer_id());
const auto readTillId = d.vread_max_id().v;
session().data().updateSublistReadTill({
parentChatId,
sublistPeerId,
readTillId,
true,
});
} break;
case mtpc_updateChannelAvailableMessages: {
auto &d = update.c_updateChannelAvailableMessages();
if (const auto channel = session().data().channelLoaded(d.vchannel_id())) {