Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dfcfbf434 | ||
|
|
56c92e8b93 | ||
|
|
639b5368ff |
No files matched your search
@@ -139,7 +139,17 @@ final class Ui {
|
|||||||
/// Split (unfolded) goes landscape at once. Portrait waits a moment and checks again, so a
|
/// Split (unfolded) goes landscape at once. Portrait waits a moment and checks again, so a
|
||||||
/// frame without a hinge reading mid-rotation can't throw an unfolded phone back upright.
|
/// frame without a hinge reading mid-rotation can't throw an unfolded phone back upright.
|
||||||
/// Back in the foreground: the phone may have been folded or unfolded meanwhile.
|
/// Back in the foreground: the phone may have been folded or unfolded meanwhile.
|
||||||
func resumed() { lockOrientation() }
|
/// The split/unfolded flags are from before the app left, so locking on them at once can force
|
||||||
|
/// landscape on a phone folded meanwhile. Free the rotation while away and decide again once
|
||||||
|
/// the window has settled to the screen it came back on.
|
||||||
|
func resumed() {
|
||||||
|
Task { @MainActor in
|
||||||
|
try? await Task.sleep(for: .milliseconds(300))
|
||||||
|
self.lockOrientation()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func backgrounded() { Orientation.lock(.allButUpsideDown) }
|
||||||
|
|
||||||
private func lockOrientation() {
|
private func lockOrientation() {
|
||||||
if split || unfolded { Orientation.lock(.landscape); return }
|
if split || unfolded { Orientation.lock(.landscape); return }
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ struct RootView: View {
|
|||||||
.onGeometryChange(for: CGFloat.self) { $0.safeAreaInsets.trailing } action: { ui.sawInsets(trailing: $0, upright: vSize == .regular) }
|
.onGeometryChange(for: CGFloat.self) { $0.safeAreaInsets.trailing } action: { ui.sawInsets(trailing: $0, upright: vSize == .regular) }
|
||||||
.background(p.bg.ignoresSafeArea())
|
.background(p.bg.ignoresSafeArea())
|
||||||
.onChange(of: ui.tabs) { _, _ in ui.ensureValidTab() }
|
.onChange(of: ui.tabs) { _, _ in ui.ensureValidTab() }
|
||||||
.onChange(of: phase) { _, ph in if ph == .active { ui.resumed() } }
|
.onChange(of: phase) { _, ph in
|
||||||
|
if ph == .active { ui.resumed() } else if ph == .background { ui.backgrounded() }
|
||||||
|
}
|
||||||
.fullScreenCover(isPresented: Binding(get: { ui.nowPlayingOpen }, set: { ui.nowPlayingOpen = $0 })) {
|
.fullScreenCover(isPresented: Binding(get: { ui.nowPlayingOpen }, set: { ui.nowPlayingOpen = $0 })) {
|
||||||
NowPlayingScreen()
|
NowPlayingScreen()
|
||||||
.overlayHost(ui.overlays, level: 1)
|
.overlayHost(ui.overlays, level: 1)
|
||||||
|
|||||||
@@ -15,6 +15,16 @@
|
|||||||
"tintColor": "#FA2D48",
|
"tintColor": "#FA2D48",
|
||||||
"category": "entertainment",
|
"category": "entertainment",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "0.10.1",
|
||||||
|
"marketingVersion": "0.10.1",
|
||||||
|
"buildVersion": "47",
|
||||||
|
"date": "2026-11-20T10:17:10-08:00",
|
||||||
|
"localizedDescription": "iOS: free orientation in background, re-lock after resume settles",
|
||||||
|
"downloadURL": "https://git.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.10.1/stemify-0.10.1.ipa",
|
||||||
|
"size": 3136176,
|
||||||
|
"minOSVersion": "17.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.10.0",
|
"version": "0.10.0",
|
||||||
"marketingVersion": "0.10.0",
|
"marketingVersion": "0.10.0",
|
||||||
|
|||||||
Reference in new issue
Block a user