fix: disambiguate SwiftUI State with macOS 27 SDK
Use a file-private ViewState alias for all twelve state properties, including start-screen hover and playback queue state, on current main@origin. Document the standalone Command Line Tools workaround. Verified: make release; release check-runtime; release CLI --help; dlopen of the release player library and terebi_app_main symbol lookup.
This commit is contained in:
+15
-12
@@ -2068,9 +2068,12 @@ struct PlaybackSurface: NSViewRepresentable {
|
||||
}
|
||||
}
|
||||
|
||||
// Select the property wrapper, not the macOS 27 macro missing from Command Line Tools.
|
||||
private typealias ViewState<Value> = SwiftUI.State<Value>
|
||||
|
||||
private struct StartScreenButtonStyle: ButtonStyle {
|
||||
var prominent = false
|
||||
@State private var hovered = false
|
||||
@ViewState private var hovered = false
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
@@ -2089,19 +2092,19 @@ private struct StartScreenButtonStyle: ButtonStyle {
|
||||
private struct PlayerContent: View {
|
||||
@ObservedObject var model: PlayerModel
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
@State private var showsRemainingTime = false
|
||||
@State private var dropTargeted = false
|
||||
@State private var showsYouTubeInput = false
|
||||
@State private var youTubeURL = ""
|
||||
@ViewState private var showsRemainingTime = false
|
||||
@ViewState private var dropTargeted = false
|
||||
@ViewState private var showsYouTubeInput = false
|
||||
@ViewState private var youTubeURL = ""
|
||||
@FocusState private var youTubeInputFocused: Bool
|
||||
@State private var controlSize = CGSize(width: 440, height: 68)
|
||||
@State private var queueFrames: [UUID: CGRect] = [:]
|
||||
@State private var queueDrag: PlaybackQueueDrag?
|
||||
@ViewState private var controlSize = CGSize(width: 440, height: 68)
|
||||
@ViewState private var queueFrames: [UUID: CGRect] = [:]
|
||||
@ViewState private var queueDrag: PlaybackQueueDrag?
|
||||
@GestureState private var queueDragging = false
|
||||
@State private var queueScroll = ScrollPosition(y: 0)
|
||||
@State private var queueScrollOffset: CGFloat = 0
|
||||
@State private var queueViewportHeight: CGFloat = 0
|
||||
@State private var queueContentHeight: CGFloat = 0
|
||||
@ViewState private var queueScroll = ScrollPosition(y: 0)
|
||||
@ViewState private var queueScrollOffset: CGFloat = 0
|
||||
@ViewState private var queueViewportHeight: CGFloat = 0
|
||||
@ViewState private var queueContentHeight: CGFloat = 0
|
||||
|
||||
private func compactTitleLabel(progress: String?, constrained: Bool) -> some View {
|
||||
HStack(spacing: 0) {
|
||||
|
||||
Reference in New Issue
Block a user