Address external review: transport-only Start must not revert Settings config
Review found a blocking bug: the compact header's transportOnly EngineConfigView and the Settings-sheet EngineConfigView each own independent @State pending config. reconfigureEngine mutates the engine in place, so the header instance's .task(id: engine identity) never re-syncs — pressing Start there re-applied its stale pending values, reverting rate/channel edits made in Settings. In transportOnly mode, skip the reconfigure and just start the already-configured engine. Also: remove the unused isNarrow / horizontalSizeClass (dead code), and honor showsFilterMenu in PedalPaletteView.horizontalBody (was only gated in vertical). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -162,11 +162,6 @@ public struct ShoeGazeBuilderView: View {
|
||||
/// Help sheet presentation flag (iOS button; macOS uses the Help menu).
|
||||
@State private var showHelpSheet: Bool = false
|
||||
|
||||
/// Compact-layout size class. `.compact` width (iPhone, iPad portrait / split view) switches to
|
||||
/// the canvas-first layout where composition panels live in sheets; `.regular` keeps the docked
|
||||
/// desktop-style layout. `nil` (unknown) is treated as regular.
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass: UserInterfaceSizeClass?
|
||||
|
||||
/// Compact-layout sheet flags — the composition panels docked in the regular layout become
|
||||
/// bottom sheets so the board canvas gets the full screen.
|
||||
@State private var showRigsSheet: Bool = false
|
||||
@@ -233,16 +228,6 @@ public struct ShoeGazeBuilderView: View {
|
||||
#endif
|
||||
}
|
||||
|
||||
/// `true` on the smaller iPads / split-view widths, where even the canvas-first docked strip
|
||||
/// (mixer + scope + Tempo/Tuner) is tight and more can move into sheets. Reserved for
|
||||
/// size-specific tuning; `.regular` is a full-screen iPad.
|
||||
private var isNarrow: Bool {
|
||||
#if os(iOS)
|
||||
return horizontalSizeClass == .compact
|
||||
#else
|
||||
return false
|
||||
#endif
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
rootContent
|
||||
|
||||
Reference in New Issue
Block a user