Compare commits

...
2 changed files with 21 additions and 3 deletions

No files matched your search

+20 -2
View File
@@ -142,10 +142,28 @@ final class Ui {
/// fold), so the lock only changes once a reading has held for a moment. Other iPhones turn freely.
private var lockGen = 0
func resumed() { lockOrientation() }
func resumed() {
lockOrientation()
if away { showPlayingFolded() }
away = false
}
/// Leaves the lock as it is: freeing it let iOS turn the window while audio kept the app alive.
func backgrounded() {}
func backgrounded() { away = true }
private var away = false
/// Folded with something playing, the app comes back on Now Playing.
private func showPlayingFolded() {
guard folded, !nowPlayingOpen, AppGraph.shared.playback.current != nil else { return }
// Back from the background folded with something playing: Now Playing slides up as if
// swiped open, once the app's own opening animation has landed.
Task { @MainActor in
try? await Task.sleep(for: .milliseconds(180))
guard self.folded, !self.nowPlayingOpen, AppGraph.shared.playback.current != nil else { return }
self.nowPlayingOpen = true
}
}
private func lockOrientation() {
guard duo || split || unfolded else { Orientation.lock(.allButUpsideDown); return }
+1 -1
View File
@@ -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: "54"
CURRENT_PROJECT_VERSION: "56"
# Dev builds override these (build-ipa.sh dev) so they install next to the release app.
APP_ID: org.cdnutter.stemify
APP_NAME: Stemify