2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +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

@@ -163,6 +163,9 @@ void History::itemRemoved(not_null<HistoryItem*> item) {
if (const auto topic = item->topic()) {
topic->applyItemRemoved(item->id);
}
if (const auto sublist = item->savedSublist()) {
sublist->applyItemRemoved(item->id);
}
if (const auto chat = peer->asChat()) {
if (const auto to = chat->getMigrateToChannel()) {
if (const auto history = owner().historyLoaded(to)) {
@@ -1311,6 +1314,9 @@ void History::newItemAdded(not_null<HistoryItem*> item) {
if (const auto topic = item->topic()) {
topic->applyItemAdded(item);
}
if (const auto sublist = item->savedSublist()) {
sublist->applyItemAdded(item);
}
if (const auto media = item->media()) {
if (const auto gift = media->gift()) {
if (const auto unique = gift->unique.get()) {