Fixed update of availability of next and previous tracks in SMC.
This commit is contained in:
parent
c6fde48936
commit
2f0fd398d5
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue