mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fixed outdated album info in reply on deleting dependency message.
This commit is contained in:
@@ -2340,14 +2340,20 @@ void Session::processNonChannelMessagesDeleted(const QVector<MTPint> &data) {
|
||||
|
||||
void Session::removeDependencyMessage(not_null<HistoryItem*> item) {
|
||||
const auto i = _dependentMessages.find(item);
|
||||
if (i == end(_dependentMessages)) {
|
||||
return;
|
||||
}
|
||||
const auto items = std::move(i->second);
|
||||
_dependentMessages.erase(i);
|
||||
if (i != end(_dependentMessages)) {
|
||||
const auto items = std::move(i->second);
|
||||
_dependentMessages.erase(i);
|
||||
|
||||
for (const auto &dependent : items) {
|
||||
dependent->dependencyItemRemoved(item);
|
||||
for (const auto &dependent : items) {
|
||||
dependent->dependencyItemRemoved(item);
|
||||
}
|
||||
}
|
||||
if (item->groupId()) {
|
||||
if (const auto group = groups().find(item)) {
|
||||
for (const auto &groupedItem : group->items) {
|
||||
updateDependentMessages(groupedItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user