parent
bd97d060a0
commit
c04533d0a8
@ -1,8 +1,13 @@ |
||||
import Foundation |
||||
|
||||
// `nonisolated` opts this struct out of the project-wide `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor` |
||||
// setting (same reason as Track, Playlist, etc.). `Sendable` is omitted because the closure |
||||
// properties are not Sendable — the config is created and consumed exclusively on @MainActor. |
||||
nonisolated struct TrackContextMenuConfig { |
||||
let playlists: [Playlist] |
||||
let lastUsedPlaylistName: String? |
||||
let selectedPlaylist: Playlist? |
||||
let onAddToPlaylist: (Track, Playlist) -> Void |
||||
let onAddToLastPlaylist: ((Track) -> Void)? |
||||
let onAddToLastPlaylist: ((Track) -> Void)? // nil hides the "Add to [last]" button; always non-nil in practice |
||||
let onRemoveFromPlaylist: ((Track) -> Void)? |
||||
} |
||||
|
||||
Loading…
Reference in new issue