jonathangarelick / SoundSeer

SoundSeer is a macOS app that shows your current song & controls in the menu bar.
122 stars 2 forks source link

Dynamic resizing does not initiate on startup #38

Open jonathangarelick opened 2 weeks ago

jonathangarelick commented 2 weeks ago

Repro:

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 commented 2 weeks ago

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