diff --git a/static/app.js b/static/app.js index 2556d96..6b21c63 100644 --- a/static/app.js +++ b/static/app.js @@ -358,12 +358,14 @@ function updateUI(status) { } // 3. Play/Pause Button State - if (status.playing) { - playPauseIcon.setAttribute('data-lucide', 'pause'); - btnPlayPause.title = "Wstrzymaj"; - } else { - playPauseIcon.setAttribute('data-lucide', 'play'); - btnPlayPause.title = "Odtwarzaj"; + const targetIcon = status.playing ? 'pause' : 'play'; + if (btnPlayPause.dataset.state !== targetIcon) { + btnPlayPause.dataset.state = targetIcon; + btnPlayPause.innerHTML = ``; + btnPlayPause.title = status.playing ? "Wstrzymaj" : "Odtwarzaj"; + if (window.lucide) { + lucide.createIcons(); + } } // 4. Volume State