|
|
|
@ -81,7 +81,7 @@ class SoundModel: ObservableObject, SoundHolder { |
|
|
|
|
|
|
|
|
|
|
|
fileprivate func _togglePlaylist(_ playlist: Playlist) { |
|
|
|
fileprivate func _togglePlaylist(_ playlist: Playlist) { |
|
|
|
// toggle playlist if necessary |
|
|
|
// toggle playlist if necessary |
|
|
|
let playlistSounds: [Sound] = SoundCatalog.main.sounds(for: playlist) |
|
|
|
let playlistSounds = SoundCatalog.main.sounds(for: playlist) |
|
|
|
if self.sounds.isSuperset(of: playlistSounds) { |
|
|
|
if self.sounds.isSuperset(of: playlistSounds) { |
|
|
|
self.playlists.insert(playlist) |
|
|
|
self.playlists.insert(playlist) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -92,7 +92,7 @@ class SoundModel: ObservableObject, SoundHolder { |
|
|
|
|
|
|
|
|
|
|
|
func selectPlaylist(_ playlist: Playlist, selected: Bool) { |
|
|
|
func selectPlaylist(_ playlist: Playlist, selected: Bool) { |
|
|
|
|
|
|
|
|
|
|
|
let sounds: [Sound] = SoundCatalog.main.sounds(for: playlist) |
|
|
|
let sounds = SoundCatalog.main.sounds(for: playlist) |
|
|
|
if selected { |
|
|
|
if selected { |
|
|
|
self.playlists.insert(playlist) |
|
|
|
self.playlists.insert(playlist) |
|
|
|
self.sounds.formUnion(sounds) |
|
|
|
self.sounds.formUnion(sounds) |
|
|
|
|