Fixed empty chat list preview after deleting last message.

Regression was introduced in 6c88a90d28.
This commit is contained in:
23rd
2026-06-01 13:35:03 +03:00
parent 712ed6ebc6
commit b89fd24339
+8 -8
View File
@@ -2967,9 +2967,7 @@ void Session::processMessagesDeleted(
if (list && i != list->end()) {
const auto history = i->second->history();
toDestroy.push_back(i->second);
if (!history->chatListMessageKnown()) {
historiesToCheck.emplace(history);
}
historiesToCheck.emplace(history);
} else if (affected) {
affected->unknownMessageDeleted(messageId.v);
}
@@ -2981,7 +2979,9 @@ void Session::processMessagesDeleted(
}
}
for (const auto &history : historiesToCheck) {
history->requestChatListMessage();
if (!history->chatListMessageKnown()) {
history->requestChatListMessage();
}
}
}
@@ -2992,9 +2992,7 @@ void Session::processNonChannelMessagesDeleted(const QVector<MTPint> &data) {
if (const auto item = nonChannelMessage(messageId.v)) {
const auto history = item->history();
toDestroy.push_back(item);
if (!history->chatListMessageKnown()) {
historiesToCheck.emplace(history);
}
historiesToCheck.emplace(history);
}
}
if (!toDestroy.empty()) {
@@ -3004,7 +3002,9 @@ void Session::processNonChannelMessagesDeleted(const QVector<MTPint> &data) {
}
}
for (const auto &history : historiesToCheck) {
history->requestChatListMessage();
if (!history->chatListMessageKnown()) {
history->requestChatListMessage();
}
}
}