2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 15:15:13 +00:00

Added auto-closing to some boxes which depend on certain message.

This commit is contained in:
23rd
2020-10-20 23:25:42 +03:00
committed by John Preston
parent bc7975ece7
commit bc8f8bc68c
4 changed files with 23 additions and 1 deletions

View File

@@ -1428,6 +1428,14 @@ rpl::producer<not_null<const HistoryItem*>> Session::itemRemoved() const {
return _itemRemoved.events();
}
rpl::producer<not_null<const HistoryItem*>> Session::itemRemoved(
FullMsgId itemId) const {
return itemRemoved(
) | rpl::filter([=](not_null<const HistoryItem*> item) {
return (itemId == item->fullId());
});
}
void Session::notifyViewRemoved(not_null<const ViewElement*> view) {
_viewRemoved.fire_copy(view);
}