diff --git a/Telegram/SourceFiles/window/system_media_controls_manager.cpp b/Telegram/SourceFiles/window/system_media_controls_manager.cpp index d6c456b984..c127ae7f02 100644 --- a/Telegram/SourceFiles/window/system_media_controls_manager.cpp +++ b/Telegram/SourceFiles/window/system_media_controls_manager.cpp @@ -163,6 +163,13 @@ SystemMediaControlsManager::SystemMediaControlsManager( _lastAudioMsgId = current; }, _lifetime); + mediaPlayer->playlistChanges( + type + ) | rpl::start_with_next([=] { + _controls->setIsNextEnabled(mediaPlayer->nextAvailable(type)); + _controls->setIsPreviousEnabled(mediaPlayer->previousAvailable(type)); + }, _lifetime); + _controls->commandRequests( ) | rpl::start_with_next([=](Command command) { switch (command) {