From 434a7c5293d7bf0c1e957d4a17b340239df95f93 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 6 Sep 2021 15:40:11 +0300 Subject: [PATCH] Remember volume from SMC. Co-authored-by: 23rd <23rd@vivaldi.net> --- Telegram/SourceFiles/media/system_media_controls_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/media/system_media_controls_manager.cpp b/Telegram/SourceFiles/media/system_media_controls_manager.cpp index 1f1c7e6cc1..43a25de588 100644 --- a/Telegram/SourceFiles/media/system_media_controls_manager.cpp +++ b/Telegram/SourceFiles/media/system_media_controls_manager.cpp @@ -248,6 +248,9 @@ SystemMediaControlsManager::SystemMediaControlsManager( _controls->volumeChangeRequests( ) | rpl::start_with_next([](float64 volume) { Player::mixer()->setSongVolume(volume); + if (volume > 0) { + Core::App().settings().setRememberedSongVolume(volume); + } Core::App().settings().setSongVolume(volume); }, _lifetime); }