Improve video lists

This commit is contained in:
Arkadiusz Fal
2022-12-13 01:50:26 +01:00
parent 8c1d900a63
commit 57b2276f36
4 changed files with 211 additions and 53 deletions

View File

@@ -26,6 +26,10 @@ private struct ListingStyleKey: EnvironmentKey {
static let defaultValue = ListingStyle.cells
}
private struct InNavigationViewKey: EnvironmentKey {
static let defaultValue = true
}
enum ListingStyle: String, CaseIterable, Defaults.Serializable {
case cells
case list
@@ -94,4 +98,9 @@ extension EnvironmentValues {
get { self[ListingStyleKey.self] }
set { self[ListingStyleKey.self] = newValue }
}
var inNavigationView: Bool {
get { self[InNavigationViewKey.self] }
set { self[InNavigationViewKey.self] = newValue }
}
}