2023-01-29 16:37:15 +00:00
|
|
|
import Foundation
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
private struct SecondaryColumnKey: EnvironmentKey {
|
|
|
|
static let defaultValue = false
|
|
|
|
}
|
|
|
|
|
2023-02-17 17:17:51 +00:00
|
|
|
private struct ExtraLeadingInset: EnvironmentKey {
|
|
|
|
static let defaultValue: CGFloat = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
private struct IsCompact: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2024-01-21 18:46:29 +00:00
|
|
|
private struct IsMediaCompact: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2024-01-10 15:50:18 +00:00
|
|
|
private struct IsModal: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2023-02-19 14:29:07 +00:00
|
|
|
private struct IsInCaptureMode: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2023-03-01 19:07:40 +00:00
|
|
|
private struct IsSupporter: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2023-09-18 05:01:23 +00:00
|
|
|
private struct IsStatusFocused: EnvironmentKey {
|
2023-09-16 13:04:42 +00:00
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2023-12-04 08:52:18 +00:00
|
|
|
private struct IsHomeTimeline: EnvironmentKey {
|
|
|
|
static let defaultValue: Bool = false
|
|
|
|
}
|
|
|
|
|
2023-11-16 08:56:00 +00:00
|
|
|
private struct IndentationLevel: EnvironmentKey {
|
|
|
|
static let defaultValue: UInt = 0
|
2023-09-16 13:04:42 +00:00
|
|
|
}
|
|
|
|
|
2023-01-30 06:27:06 +00:00
|
|
|
public extension EnvironmentValues {
|
|
|
|
var isSecondaryColumn: Bool {
|
2023-01-29 16:37:15 +00:00
|
|
|
get { self[SecondaryColumnKey.self] }
|
|
|
|
set { self[SecondaryColumnKey.self] = newValue }
|
|
|
|
}
|
2023-02-18 06:26:48 +00:00
|
|
|
|
2023-02-17 17:17:51 +00:00
|
|
|
var extraLeadingInset: CGFloat {
|
|
|
|
get { self[ExtraLeadingInset.self] }
|
|
|
|
set { self[ExtraLeadingInset.self] = newValue }
|
|
|
|
}
|
2023-02-18 06:26:48 +00:00
|
|
|
|
2023-02-17 17:17:51 +00:00
|
|
|
var isCompact: Bool {
|
|
|
|
get { self[IsCompact.self] }
|
|
|
|
set { self[IsCompact.self] = newValue }
|
|
|
|
}
|
2024-02-14 11:48:14 +00:00
|
|
|
|
2024-01-21 18:46:29 +00:00
|
|
|
var isMediaCompact: Bool {
|
|
|
|
get { self[IsMediaCompact.self] }
|
|
|
|
set { self[IsMediaCompact.self] = newValue }
|
|
|
|
}
|
2024-02-14 11:48:14 +00:00
|
|
|
|
2024-01-10 15:50:18 +00:00
|
|
|
var isModal: Bool {
|
|
|
|
get { self[IsModal.self] }
|
|
|
|
set { self[IsModal.self] = newValue }
|
|
|
|
}
|
2023-02-21 06:23:42 +00:00
|
|
|
|
2023-02-19 14:29:07 +00:00
|
|
|
var isInCaptureMode: Bool {
|
|
|
|
get { self[IsInCaptureMode.self] }
|
|
|
|
set { self[IsInCaptureMode.self] = newValue }
|
|
|
|
}
|
2023-03-13 12:38:28 +00:00
|
|
|
|
2023-03-01 19:07:40 +00:00
|
|
|
var isSupporter: Bool {
|
|
|
|
get { self[IsSupporter.self] }
|
|
|
|
set { self[IsSupporter.self] = newValue }
|
|
|
|
}
|
2023-09-18 05:01:23 +00:00
|
|
|
|
2023-09-16 13:04:42 +00:00
|
|
|
var isStatusFocused: Bool {
|
|
|
|
get { self[IsStatusFocused.self] }
|
|
|
|
set { self[IsStatusFocused.self] = newValue }
|
|
|
|
}
|
2023-09-18 19:03:52 +00:00
|
|
|
|
2023-11-16 08:56:00 +00:00
|
|
|
var indentationLevel: UInt {
|
|
|
|
get { self[IndentationLevel.self] }
|
|
|
|
set { self[IndentationLevel.self] = newValue }
|
2023-09-18 05:01:23 +00:00
|
|
|
}
|
2023-12-18 07:22:59 +00:00
|
|
|
|
2023-12-04 08:52:18 +00:00
|
|
|
var isHomeTimeline: Bool {
|
|
|
|
get { self[IsHomeTimeline.self] }
|
|
|
|
set { self[IsHomeTimeline.self] = newValue }
|
|
|
|
}
|
2023-01-29 16:37:15 +00:00
|
|
|
}
|