Fix Play/Resume highlighting

This commit is contained in:
Dmitry Lyzo 2022-01-15 20:24:25 +03:00
parent 22e45c2bf2
commit cf55e3341d

View File

@ -374,12 +374,12 @@ function reloadPlayButtons(page, item) {
hideAll(page, 'btnShuffle'); hideAll(page, 'btnShuffle');
} }
if (layoutManager.tv) {
const btnResume = page.querySelector('.mainDetailButtons .btnResume'); const btnResume = page.querySelector('.mainDetailButtons .btnResume');
const btnPlay = page.querySelector('.mainDetailButtons .btnPlay'); const btnPlay = page.querySelector('.mainDetailButtons .btnPlay');
if (layoutManager.tv && !btnResume.classList.contains('hide')) { const resumeHidden = btnResume.classList.contains('hide');
btnResume.classList.add('fab'); btnResume.classList.toggle('fab', !resumeHidden);
} else if (layoutManager.tv && btnResume.classList.contains('hide')) { btnPlay.classList.toggle('fab', resumeHidden);
btnPlay.classList.add('fab');
} }
return canPlay; return canPlay;