From d6da47db9d9aff7e983b511319cde1f8fb92a26c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 20 Nov 2026 10:20:09 -0800 Subject: [PATCH] iOS: only the on-screen Duo pane reports split/unfolded; build 48 Co-Authored-By: Claude Opus 5.5 --- ios/Stemify/UI/RootView.swift | 9 +++++++-- ios/project.yml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ios/Stemify/UI/RootView.swift b/ios/Stemify/UI/RootView.swift index 16b79c7..af73fa7 100644 --- a/ios/Stemify/UI/RootView.swift +++ b/ios/Stemify/UI/RootView.swift @@ -200,6 +200,7 @@ private struct DuoPane: View { @Environment(Ui.self) private var ui @AppStorage("duoSwap") private var swap = false @Environment(\.palette) private var p + @State private var shown = false private var g: AppGraph { .shared } var body: some View { @@ -231,8 +232,12 @@ private struct DuoPane: View { // The hinge gap shows whatever is behind; paint it so the two sides read as one. .background(p.bg.ignoresSafeArea()) .animation(.spring(duration: 0.4, bounce: 0.1), value: flip) - .onChange(of: hinge != nil, initial: true) { _, on in ui.setUnfolded(on) } - .onChange(of: cut != nil, initial: true) { _, on in ui.setSplit(on) } + // Every tab has its own pane and TabView keeps hidden ones alive, so only the one on + // screen reports; a hidden one's stale size used to turn split off under the visible one. + .onChange(of: hinge != nil) { _, on in if shown { ui.setUnfolded(on) } } + .onChange(of: cut != nil) { _, on in if shown { ui.setSplit(on) } } + .onAppear { shown = true; ui.setUnfolded(hinge != nil); ui.setSplit(cut != nil) } + .onDisappear { shown = false } } } diff --git a/ios/project.yml b/ios/project.yml index d9fadd8..7e184c1 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -9,7 +9,7 @@ settings: # iOS needs a plain number for the bundle version; the label is what the app and releases show. MARKETING_VERSION: "0.10.1" VERSION_LABEL: "0.10.1" - CURRENT_PROJECT_VERSION: "47" + CURRENT_PROJECT_VERSION: "48" # Dev builds override these (build-ipa.sh dev) so they install next to the release app. APP_ID: org.cdnutter.stemify APP_NAME: Stemify