mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Playlists handling improvements
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user