mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Added ability to close media viewer with click on same media.
This commit is contained in:
parent
aa9e56c633
commit
63c390c505
1 changed files with 11 additions and 0 deletions
|
@ -2808,6 +2808,17 @@ void OverlayWidget::show(OpenRequest request) {
|
|||
const auto contextItem = request.item();
|
||||
const auto contextPeer = request.peer();
|
||||
const auto contextTopicRootId = request.topicRootId();
|
||||
if (!request.continueStreaming() && !request.startTime()) {
|
||||
if (_message && (_message == contextItem)) {
|
||||
_message = nullptr;
|
||||
return close();
|
||||
} else if (_user && (_user == contextPeer)) {
|
||||
if ((_photo && (_photo == photo))
|
||||
|| (_document && (_document == document))) {
|
||||
return close();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (photo) {
|
||||
if (contextItem && contextPeer) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue