DropletLiveActivityPriority
How much a live activity matters right now (DroppyKit 1.23.0).
enum DropletLiveActivityPriority
Available from DroppyKit 1.23.0.
Five bands on the 0...1000 scale the host compares priority on, lowest first. Pick the band that says what the row is, never a number to outbid another droplet:
| Band | Value | Raw priorities in it | For |
|---|---|---|---|
ambient | 100 | below 200 | Something that is simply true: a status, a clock, a price |
status | 300 | 200...399 | A state the user chose and wants to keep in view: a mode, a connection, a session |
progress | 500 | 400...599 | Work that runs and ends: a build, an upload, a sync |
countdown | 700 | 600...799 | Time running out: a timer, a departure, a deadline |
attention | 900 | 800 and above | Something to act on now: a failed build, a call, a timer that rang |
Droppy compares bands, not numbers: two droplets in the same band tie, whatever raw numbers they published, and the tie goes to the activity whose presentation changed most recently. A droplet that publishes 299 to beat 250 is in the same band and gains nothing. No band takes the seat from Droppy's own activities, which are not on this scale at all.
Cases
DropletLiveActivityPriority.ambient
case ambient
Something that is simply true: a status, a clock, a price.
DropletLiveActivityPriority.status
case status
A state the user chose and wants in view: a mode, a connection.
DropletLiveActivityPriority.progress
case progress
Work that runs and ends: a build, an upload, a sync.
DropletLiveActivityPriority.countdown
case countdown
Time running out: a timer, a departure, a deadline.
DropletLiveActivityPriority.attention
case attention
Something the user should act on now.
Initializers
init(clamping:)
init(clamping priority: Int)
The band a raw priority falls in, the way the host reads it: held to 0...1000, then 200 points per band.
init(rawValue:)
init?(rawValue: Int)
Operators
<(_:_:)
static func < (lhs: DropletLiveActivityPriority, rhs: DropletLiveActivityPriority) -> Bool