fix: ensure view drop stop playback startup (#3875)

This commit is contained in:
Krzysztof Moch
2024-06-07 13:54:14 +02:00
parent 7133c96cac
commit ff1e24aaad
3 changed files with 26 additions and 5 deletions

View File

@@ -61,11 +61,11 @@ class NowPlayingInfoCenterManager {
return
}
if let observer = observers[players.hashValue] {
if let observer = observers[player.hashValue] {
observer.invalidate()
}
observers.removeValue(forKey: players.hashValue)
observers.removeValue(forKey: player.hashValue)
players.remove(player)
if currentPlayer == player {