Fixed build on Windows and Linux.

This commit is contained in:
23rd
2025-12-14 12:54:55 +03:00
parent 68b245c3d6
commit df98cdb127
@@ -95,10 +95,9 @@ SystemMediaControlsManager::SystemMediaControlsManager()
mediaPlayer->stops(AudioMsgId::Type::Voice) | rpl::map_to(false),
mediaPlayer->startsPlay(AudioMsgId::Type::Voice) | rpl::map_to(true)
) | rpl::distinct_until_changed() | rpl::on_next([=](bool audio) {
const auto current = mediaPlayer->current(AudioMsgId::Type::Song)
const auto type = mediaPlayer->current(AudioMsgId::Type::Song)
? AudioMsgId::Type::Song
: AudioMsgId::Type::Voice;
const auto type = current;
_controls->setEnabled(audio);
if (audio) {
_controls->setIsNextEnabled(mediaPlayer->nextAvailable(type));