From 70fe6497439ecfbb272a6319ba542991717cd430 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 1 Jun 2024 22:31:43 +0400 Subject: [PATCH] Hide media viewer on macOS when showing IV. --- Telegram/SourceFiles/iv/iv_instance.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/iv/iv_instance.cpp b/Telegram/SourceFiles/iv/iv_instance.cpp index ab2e21327..69df5f772 100644 --- a/Telegram/SourceFiles/iv/iv_instance.cpp +++ b/Telegram/SourceFiles/iv/iv_instance.cpp @@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "iv/iv_instance.h" #include "apiwrap.h" +#include "base/platform/base_platform_info.h" #include "boxes/share_box.h" #include "core/application.h" #include "core/file_utilities.h" @@ -741,6 +742,11 @@ void Instance::show( not_null session, not_null data, QString hash) { + if (Platform::IsMac()) { + // Otherwise IV is not visible under the media viewer. + Core::App().hideMediaView(); + } + const auto guard = gsl::finally([&] { requestFull(session, data->id()); });