mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix possible crash in media viewer content re-show.
This commit is contained in:
parent
68eb99bde0
commit
f410a3b6da
2 changed files with 5 additions and 2 deletions
|
@ -2072,14 +2072,16 @@ void OverlayWidget::handleDocumentClick() {
|
|||
if (_document->loading()) {
|
||||
saveCancel();
|
||||
} else {
|
||||
_reShow = true;
|
||||
Data::ResolveDocument(
|
||||
findWindow(),
|
||||
_document,
|
||||
_message,
|
||||
_topicRootId);
|
||||
if (_document->loading() && !_radial.animating()) {
|
||||
if (_document && _document->loading() && !_radial.animating()) {
|
||||
_radial.start(_documentMedia->progress());
|
||||
}
|
||||
_reShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2852,7 +2854,7 @@ 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 (!request.continueStreaming() && !request.startTime() && !_reShow) {
|
||||
if (_message && (_message == contextItem)) {
|
||||
return close();
|
||||
} else if (_user && (_user == contextPeer)) {
|
||||
|
|
|
@ -539,6 +539,7 @@ private:
|
|||
QImage _staticContent;
|
||||
bool _staticContentTransparent = false;
|
||||
bool _blurred = true;
|
||||
bool _reShow = false;
|
||||
|
||||
ContentGeometry _oldGeometry;
|
||||
Ui::Animations::Simple _geometryAnimation;
|
||||
|
|
Loading…
Add table
Reference in a new issue