iOS: only the on-screen Duo pane reports split/unfolded; build 48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4dfcfbf434
commit
d6da47db9d
2 files changed
+8
-3
No files matched your search
@@ -200,6 +200,7 @@ private struct DuoPane<Content: View>: View {
|
|||||||
@Environment(Ui.self) private var ui
|
@Environment(Ui.self) private var ui
|
||||||
@AppStorage("duoSwap") private var swap = false
|
@AppStorage("duoSwap") private var swap = false
|
||||||
@Environment(\.palette) private var p
|
@Environment(\.palette) private var p
|
||||||
|
@State private var shown = false
|
||||||
private var g: AppGraph { .shared }
|
private var g: AppGraph { .shared }
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -231,8 +232,12 @@ private struct DuoPane<Content: View>: View {
|
|||||||
// The hinge gap shows whatever is behind; paint it so the two sides read as one.
|
// The hinge gap shows whatever is behind; paint it so the two sides read as one.
|
||||||
.background(p.bg.ignoresSafeArea())
|
.background(p.bg.ignoresSafeArea())
|
||||||
.animation(.spring(duration: 0.4, bounce: 0.1), value: flip)
|
.animation(.spring(duration: 0.4, bounce: 0.1), value: flip)
|
||||||
.onChange(of: hinge != nil, initial: true) { _, on in ui.setUnfolded(on) }
|
// Every tab has its own pane and TabView keeps hidden ones alive, so only the one on
|
||||||
.onChange(of: cut != nil, initial: true) { _, on in ui.setSplit(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 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ settings:
|
|||||||
# iOS needs a plain number for the bundle version; the label is what the app and releases show.
|
# iOS needs a plain number for the bundle version; the label is what the app and releases show.
|
||||||
MARKETING_VERSION: "0.10.1"
|
MARKETING_VERSION: "0.10.1"
|
||||||
VERSION_LABEL: "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.
|
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
|
||||||
APP_ID: org.cdnutter.stemify
|
APP_ID: org.cdnutter.stemify
|
||||||
APP_NAME: Stemify
|
APP_NAME: Stemify
|
||||||
|
|||||||
Reference in new issue
Block a user