Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(popupLyrics): update view in system tray mode #3330

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

Lseoksee
Copy link
Contributor

@Lseoksee Lseoksee commented Feb 28, 2025

Fix the issue where lyrics were not updating when Spotify was in tray mode (minimized).

The callback of the requestAnimationFrame() function stops working when Spotify is switched to tray mode (minimized), making it impossible to check if document.hidden is true.

Due to the asynchronous nature of the callback, there are cases where tick() passes through before the callback is interrupted, causing document.hidden to return true and allowing lyrics to be updated in tray mode. However, the likelihood of this happening is too low.

So, I changed the structure to listen for the visibilitychange event.

@Lseoksee Lseoksee changed the title fix(popupLyrics): Fix lyrics update issue in system tray mode fix(popupLyrics): fix lyrics update issue in system tray mode Feb 28, 2025
@rxri rxri changed the title fix(popupLyrics): fix lyrics update issue in system tray mode fix(popupLyrics): lyrics update issue in system tray mode Feb 28, 2025
@rxri rxri changed the title fix(popupLyrics): lyrics update issue in system tray mode fix(popupLyrics): update view in system tray mode Feb 28, 2025
@rxri rxri merged commit 5944d06 into spicetify:main Feb 28, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants