mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Fixed update of availability of next and previous tracks in SMC.
This commit is contained in:
parent
c6fde48936
commit
2f0fd398d5
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue