Added await to player.toggleRepeat

This commit is contained in:
tezvii 2026-04-07 19:41:15 +03:00 committed by GitHub
parent 893138e15b
commit b40fc4617e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -585,7 +585,7 @@ export function initializePlayerEvents(player, audioPlayer, scrobbler, ui) {
repeatBtn.addEventListener('click', async () => {
await hapticLight();
const mode = player.toggleRepeat();
const mode = await player.toggleRepeat();
trackToggleRepeat(mode === REPEAT_MODE.OFF ? 'off' : mode === REPEAT_MODE.ALL ? 'all' : 'one');
repeatBtn.classList.toggle('active', mode !== REPEAT_MODE.OFF);
repeatBtn.classList.toggle('repeat-one', mode === REPEAT_MODE.ONE);