jonathangarelick / SoundSeer

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

Dynamic resizing does not initiate on startup #38

Open jonathangarelick opened 6 months ago

jonathangarelick commented 6 months 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 6 months ago

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