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

Dynamic resizing does not initiate on startup #38

Open
jonathangarelick opened this issue May 17, 2024 · 1 comment
Open

Dynamic resizing does not initiate on startup #38

jonathangarelick opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working v1.2.0

Comments

@jonathangarelick
Copy link
Owner

Repro:

  • Start SoundSeer while a Spotify song is playing
  • Have a song with a name that is really long (might need to adjust prefixLength to 60)

I was previously relying on handleVisibilityChange() being called twice on startup (the first time, the player is nil). Now, it seems to only be called once.

This can be fixed by adding the following code to SoundSeerViewModel's init function:

DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { [weak self] in
    self?.handleVisibilityChange(false)
}
@jonathangarelick jonathangarelick added bug Something isn't working v1.2.0 labels May 17, 2024
@jonathangarelick
Copy link
Owner Author

Also worth noting that dynamic resizing does start working as soon as the playback state changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.2.0
Projects
None yet
Development

No branches or pull requests

1 participant