mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-10 05:33:50 +00:00
Fixed empty chat list preview after deleting last message.
Regression was introduced in 6c88a90d28.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user