2021-08-31 21:17:50 +00:00
|
|
|
import Foundation
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
private struct InNavigationViewKey: EnvironmentKey {
|
|
|
|
static let defaultValue = false
|
|
|
|
}
|
|
|
|
|
2021-09-18 20:36:42 +00:00
|
|
|
private struct HorizontalCellsKey: EnvironmentKey {
|
|
|
|
static let defaultValue = false
|
|
|
|
}
|
|
|
|
|
2021-08-31 21:17:50 +00:00
|
|
|
extension EnvironmentValues {
|
|
|
|
var inNavigationView: Bool {
|
|
|
|
get { self[InNavigationViewKey.self] }
|
|
|
|
set { self[InNavigationViewKey.self] = newValue }
|
|
|
|
}
|
2021-09-18 20:36:42 +00:00
|
|
|
|
|
|
|
var horizontalCells: Bool {
|
|
|
|
get { self[HorizontalCellsKey.self] }
|
|
|
|
set { self[HorizontalCellsKey.self] = newValue }
|
|
|
|
}
|
2021-08-31 21:17:50 +00:00
|
|
|
}
|