From 2eaa66e8734c02036e35aafca95556cb2fe9ef7c Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 12 Mar 2023 15:26:22 +0400 Subject: [PATCH] Show speed control in media viewer only when supported --- .../SourceFiles/media/view/media_view_playback_controls.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/media/view/media_view_playback_controls.cpp b/Telegram/SourceFiles/media/view/media_view_playback_controls.cpp index 1deb14d0e..3b18ba9a6 100644 --- a/Telegram/SourceFiles/media/view/media_view_playback_controls.cpp +++ b/Telegram/SourceFiles/media/view/media_view_playback_controls.cpp @@ -362,7 +362,7 @@ void PlaybackControls::showMenu() { _menu.emplace(this, _menuStyle); - { + if (Media::Audio::SupportsSpeedControl()) { auto speedItem = base::make_unique_q( _menu, _menuStyle.menu, @@ -372,10 +372,9 @@ void PlaybackControls::showMenu() { updatePlaybackSpeed(speed); }, speedItem->lifetime()); _menu->addAction(std::move(speedItem)); + _menu->addSeparator(); } - _menu->addSeparator(); - _menu->addAction(tr::lng_mediaview_rotate_video(tr::now), [=] { _delegate->playbackControlsRotate(); });