Add async and await to repeatBtn

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

View file

@ -2024,8 +2024,8 @@ export class UIRenderer {
shuffleBtn.classList.toggle('active', this.player.shuffleActive);
};
repeatBtn.onclick = () => {
const mode = this.player.toggleRepeat();
repeatBtn.onclick = async () => {
const mode = await this.player.toggleRepeat();
repeatBtn.classList.toggle('active', mode !== 0);
if (mode === 2) {
repeatBtn.innerHTML = SVG_REPEAT_ONE(24);