From be99e26981355f5764345023b2788380320b62c3 Mon Sep 17 00:00:00 2001 From: Eric Dahl Date: Sat, 10 Oct 2026 23:36:20 -0400 Subject: [PATCH] Sheets follow a new Appearance at once, not after they are closed Each sheet applies the Appearance itself; iOS presents a sheet on its own, and one that only inherits the window's look kept the old one. Assisted-by: Claude Code:claude-opus-5-5 Claude-Session: https://claude.ai/code/session_01S6amVoNeB4GahnMMe79dZ6 --- App/ProSection.swift | 4 ++-- App/RecordScreen.swift | 14 +++++++++----- App/SettingsView.swift | 2 +- App/ShowDetailView.swift | 2 ++ App/ShowListView.swift | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/App/ProSection.swift b/App/ProSection.swift index 8ffa70c1..86afdb60 100644 --- a/App/ProSection.swift +++ b/App/ProSection.swift @@ -47,8 +47,8 @@ struct ProSection: View { } footer: { Text(footer) } - .sheet(isPresented: $showingTrial) { TrialSheet(store: store) } - .sheet(isPresented: $showingPaywall) { PaywallSheet(store: store, moment: nil) } + .sheet(isPresented: $showingTrial) { TrialSheet(store: store).modifier(AppearanceRoot(mode: model.appearance)) } + .sheet(isPresented: $showingPaywall) { PaywallSheet(store: store, moment: nil).modifier(AppearanceRoot(mode: model.appearance)) } } private var priceText: String { diff --git a/App/RecordScreen.swift b/App/RecordScreen.swift index 38ca0ff3..47ce3b28 100644 --- a/App/RecordScreen.swift +++ b/App/RecordScreen.swift @@ -59,6 +59,7 @@ struct RecordScreen: View { #if os(macOS) .frame(minWidth: 440, minHeight: 360) #endif + .modifier(AppearanceRoot(mode: model.appearance)) } .alert( "Name channel \(namingChannel ?? 0)", @@ -70,11 +71,13 @@ struct RecordScreen: View { } message: { Text("The files take the name when the Take ends. Leave it empty to take the name off.") } - .sheet(isPresented: $showingNewShow) { NewShowSheet(model: model) } - .sheet(isPresented: $showingShowList) { ShowListView(model: model) } - .sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model) } - .sheet(isPresented: $showingTrialOffer) { TrialSheet(store: model.pro) } - .sheet(item: $model.paywall) { request in PaywallSheet(store: model.pro, moment: request.moment) } + // Each sheet applies the Appearance itself: iOS presents a sheet on its own, and one that only inherits the + // window's look keeps the old one until it is shown again. + .sheet(isPresented: $showingNewShow) { NewShowSheet(model: model).modifier(AppearanceRoot(mode: model.appearance)) } + .sheet(isPresented: $showingShowList) { ShowListView(model: model).modifier(AppearanceRoot(mode: model.appearance)) } + .sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model).modifier(AppearanceRoot(mode: model.appearance)) } + .sheet(isPresented: $showingTrialOffer) { TrialSheet(store: model.pro).modifier(AppearanceRoot(mode: model.appearance)) } + .sheet(item: $model.paywall) { request in PaywallSheet(store: model.pro, moment: request.moment).modifier(AppearanceRoot(mode: model.appearance)) } // The first-launch Trial offer: once, when the Pro price has loaded, and never during a Take. .onChange(of: model.pro.proProduct?.displayPrice, initial: true) { _, price in guard ProSection.isOffered, TrialOffer.shouldOffer( @@ -121,6 +124,7 @@ struct RecordScreen: View { } } .presentationDetents([.large]) + .modifier(AppearanceRoot(mode: model.appearance)) } #endif .confirmationDialog("Stop recording?", isPresented: $model.confirmingStop, titleVisibility: .visible) { diff --git a/App/SettingsView.swift b/App/SettingsView.swift index 92bb7183..b38e2b85 100644 --- a/App/SettingsView.swift +++ b/App/SettingsView.swift @@ -114,7 +114,7 @@ struct SettingsView: View { if ProSection.isOffered, !locked(.pro) { ProSection(model: model) } } .formStyle(.grouped) - .sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model) } + .sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model).modifier(AppearanceRoot(mode: model.appearance)) } .fileImporter(isPresented: $choosing, allowedContentTypes: [.folder]) { result in if case .success(let url) = result { model.drive.choose(url) } } diff --git a/App/ShowDetailView.swift b/App/ShowDetailView.swift index 27cecb8a..5d0e3745 100644 --- a/App/ShowDetailView.swift +++ b/App/ShowDetailView.swift @@ -81,9 +81,11 @@ struct ShowDetailView: View { .task { await reload() } .sheet(item: Binding(get: { deletingFile.map { FileID(take: $0.take, channel: $0.channel) } }, set: { deletingFile = $0.map { ($0.take, $0.channel) } })) { id in DeleteShowSheet(model: model, show: show, take: id.take, channel: id.channel) { Task { await reload() } } + .modifier(AppearanceRoot(mode: model.appearance)) } .sheet(item: Binding(get: { deletingTake.map { TakeID(number: $0) } }, set: { deletingTake = $0?.number })) { id in DeleteShowSheet(model: model, show: show, take: id.number) { Task { await reload() } } + .modifier(AppearanceRoot(mode: model.appearance)) } .alert("Save as Template", isPresented: $savingTemplate) { TextField("Template name", text: $templateName) diff --git a/App/ShowListView.swift b/App/ShowListView.swift index c61a0249..1ebfa64c 100644 --- a/App/ShowListView.swift +++ b/App/ShowListView.swift @@ -57,6 +57,7 @@ struct ShowListView: View { } .sheet(item: $deleting) { show in DeleteShowSheet(model: model, show: show) { Task { await reload() } } + .modifier(AppearanceRoot(mode: model.appearance)) } #if os(macOS) .frame(minWidth: 460, minHeight: 360)