iOS 1.0 RC 1: battery and heat work, version label, web player redraw tweaks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-11-06 08:31:00 -08:00
1 parent 0fc35b13e8
commit c0e33b5e3e
18 files changed
+143 -36

No files matched your search

+1
View File
@@ -36,6 +36,7 @@ struct StemifyApp: App {
RootView()
}
.onChange(of: phase) { _, p in
AppActivity.setPhone(p != .background)
guard p == .active else { return }
AppGraph.shared.eq.refreshRoute()
// Keep downloaded playlists in step with the server, like Plexamp.
+10 -3
View File
@@ -34,6 +34,7 @@ final class WidgetBridge: @unchecked Sendable {
private var last: WidgetSnapshot?
private var artKey: String?
private var savedArt: String?
private var pending: DispatchWorkItem?
func start(_ g: AppGraph) {
let pm = g.playback, s = g.settings, plex = g.plex
@@ -46,13 +47,19 @@ final class WidgetBridge: @unchecked Sendable {
}
/// Writes the snapshot and asks WidgetKit to redraw, but only when something the widgets show has changed.
/// Changes settle for a moment first: a fader drag would otherwise relaunch the widget extension every frame.
func publish(_ pm: PlaybackManager, _ s: Settings, force: Bool = false) {
let snap = make(pm, s)
guard force || snap != last else { return }
last = snap
WidgetStore.save(snap)
WidgetCenter.shared.reloadAllTimelines()
if #available(iOS 18.0, *) { ControlCenter.shared.reloadAllControls() }
pending?.cancel()
let push = DispatchWorkItem {
WidgetStore.save(snap)
WidgetCenter.shared.reloadAllTimelines()
if #available(iOS 18.0, *) { ControlCenter.shared.reloadAllControls() }
}
pending = push
if force { push.perform() } else { DispatchQueue.main.asyncAfter(deadline: .now() + 0.6, execute: push) }
}
private func make(_ pm: PlaybackManager, _ s: Settings) -> WidgetSnapshot {