mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Destroy boxes in Ui::hideLayer().
This commit is contained in:
@@ -385,8 +385,10 @@ void MainWindow::ui_showMediaPreview(
|
||||
_mediaPreview->showPreview(origin, photo);
|
||||
}
|
||||
|
||||
void MainWindow::ui_hideMediaPreview() {
|
||||
if (!_mediaPreview) return;
|
||||
void MainWindow::hideMediaPreview() {
|
||||
if (!_mediaPreview) {
|
||||
return;
|
||||
}
|
||||
_mediaPreview->hidePreview();
|
||||
}
|
||||
|
||||
@@ -484,12 +486,12 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
|
||||
} break;
|
||||
|
||||
case QEvent::MouseButtonRelease: {
|
||||
Ui::hideMediaPreview();
|
||||
hideMediaPreview();
|
||||
} break;
|
||||
|
||||
case QEvent::ApplicationActivate: {
|
||||
if (object == QCoreApplication::instance()) {
|
||||
InvokeQueued(this, [this] {
|
||||
InvokeQueued(this, [=] {
|
||||
handleActiveChanged();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user