mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Close media viewer when photo message is deleted.
This commit is contained in:
parent
3d54a263b8
commit
f064692e57
1 changed files with 2 additions and 1 deletions
|
@ -3676,7 +3676,8 @@ void OverlayWidget::setSession(not_null<Main::Session*> session) {
|
||||||
|
|
||||||
session->data().itemRemoved(
|
session->data().itemRemoved(
|
||||||
) | rpl::filter([=](not_null<const HistoryItem*> item) {
|
) | rpl::filter([=](not_null<const HistoryItem*> item) {
|
||||||
return (_document != nullptr) && (item->fullId() == _msgid);
|
return (_document != nullptr || _photo != nullptr)
|
||||||
|
&& (item->fullId() == _msgid);
|
||||||
}) | rpl::start_with_next([=] {
|
}) | rpl::start_with_next([=] {
|
||||||
close();
|
close();
|
||||||
}, _sessionLifetime);
|
}, _sessionLifetime);
|
||||||
|
|
Loading…
Add table
Reference in a new issue