[thanos] Pre-captured snapshots before batch destruction via event.

This commit is contained in:
23rd
2026-04-09 22:10:54 +03:00
parent 1e29719412
commit 1167523f4a
5 changed files with 69 additions and 32 deletions
@@ -2182,6 +2182,16 @@ rpl::producer<not_null<const HistoryItem*>> Session::itemRemoved(
});
}
void Session::notifyItemsAboutToBeDestroyed(
const std::vector<not_null<HistoryItem*>> &items) {
_itemsAboutToBeDestroyed.fire_copy(items);
}
auto Session::itemsAboutToBeDestroyed() const
-> rpl::producer<std::vector<not_null<HistoryItem*>>> {
return _itemsAboutToBeDestroyed.events();
}
void Session::notifyViewAboutToBeRemoved(
not_null<const ViewElement*> view) {
_viewAboutToBeRemoved.fire_copy(view);