Playlists handling improvements

This commit is contained in:
Arkadiusz Fal
2021-10-24 23:36:24 +02:00
parent 19bb4955a2
commit 1ca7b04e89
7 changed files with 81 additions and 76 deletions

View File

@@ -17,6 +17,10 @@ private struct NavigationStyleKey: EnvironmentKey {
static let defaultValue = NavigationStyle.tab
}
private struct CurrentPlaylistID: EnvironmentKey {
static let defaultValue: String? = nil
}
extension EnvironmentValues {
var inNavigationView: Bool {
get { self[InNavigationViewKey.self] }
@@ -32,4 +36,9 @@ extension EnvironmentValues {
get { self[NavigationStyleKey.self] }
set { self[NavigationStyleKey.self] = newValue }
}
var currentPlaylistID: String? {
get { self[CurrentPlaylistID.self] }
set { self[CurrentPlaylistID.self] = newValue }
}
}