2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Improve topic by message resolving.

This commit is contained in:
John Preston
2022-09-27 21:47:30 +04:00
parent d7fdd80f55
commit 4724ef91f6
4 changed files with 27 additions and 30 deletions

View File

@@ -1134,13 +1134,9 @@ void History::newItemAdded(not_null<HistoryItem*> item) {
if (!folderKnown()) {
owner().histories().requestDialogEntry(this);
}
if (peer->isForum()) {
if (const auto forum = peer->asChannel()->forum()) {
/*if (item->isTopicStart()) { // #TODO forum isTopicStart legacy?
forum->topicAdded(item);
} else */if (const auto topic = forum->topicFor(item)) {
topic->applyItemAdded(item);
}
if (const auto forum = peer->forum()) {
if (const auto topic = forum->topicFor(item)) {
topic->applyItemAdded(item);
}
}
}