Changed the logic of the music player when clicking on the next and previous buttons, now, a short click goes to the next/previous track and a long click forwards/rewinds the song by X seconds

This commit is contained in:
anschrammh 2023-05-30 19:12:05 +02:00
parent 5a62e05e0e
commit 10cb049ab1

View File

@ -57,11 +57,11 @@ static void music_player_button_click_event_cb(lv_event_t *e)
}
else if(action == MUSIC_CONTROL_NEXT)
{
musicPlayerScreen->musicPlaybackCtrlCb(e->code == LV_EVENT_SHORT_CLICKED ? MUSIC_CONTROL_FORWARD : MUSIC_CONTROL_NEXT);
musicPlayerScreen->musicPlaybackCtrlCb(e->code == LV_EVENT_SHORT_CLICKED ? MUSIC_CONTROL_NEXT : MUSIC_CONTROL_FORWARD);
}
else if(action == MUSIC_CONTROL_PREVIOUS)
{
musicPlayerScreen->musicPlaybackCtrlCb(e->code == LV_EVENT_SHORT_CLICKED ? MUSIC_CONTROL_REWIND : MUSIC_CONTROL_PREVIOUS);
musicPlayerScreen->musicPlaybackCtrlCb(e->code == LV_EVENT_SHORT_CLICKED ? MUSIC_CONTROL_PREVIOUS : MUSIC_CONTROL_REWIND);
}
else
{