iOS Live Activity Updates
Nucleic-Session: 665980BA-E8A5-4E84-9DF4-1757CF792353 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -15,6 +15,13 @@ final class LiveActivityManager {
|
|||||||
/// still summarize everything, this just bounds the per-session list.
|
/// still summarize everything, this just bounds the per-session list.
|
||||||
private static let maxLines = 3
|
private static let maxLines = 3
|
||||||
|
|
||||||
|
/// How long the terminal "all clear / Done" glance lingers before the Activity dismisses. Long
|
||||||
|
/// enough to read at a glance, short enough not to loiter on the lock screen.
|
||||||
|
private static let doneLinger: Duration = .seconds(4)
|
||||||
|
/// The delayed dismissal after the Done glance is shown, cancelled if work resumes first — so a
|
||||||
|
/// completed run flashes "Done" and then clears instead of vanishing the instant it finishes.
|
||||||
|
private var dismissTask: Task<Void, Never>?
|
||||||
|
|
||||||
private var activity: Activity<NucleicSessionAttributes>?
|
private var activity: Activity<NucleicSessionAttributes>?
|
||||||
|
|
||||||
/// The last content we pushed. Updates that don't change it are skipped so we don't spend
|
/// The last content we pushed. Updates that don't change it are skipped so we don't spend
|
||||||
|
|||||||
Reference in New Issue
Block a user