DropletLiveActivityService
Drives this droplet's live activity.
@MainActor protocol DropletLiveActivityService : AnyObject
A droplet publishes liveActivityState; the host decides which activity wins the compact seat. This service is the imperative half: it reports which seat, if any, the droplet currently holds, and lets the droplet stand down voluntarily.
Properties
seat
@MainActor var seat: DropletLiveActivitySeat { get }
The seat this droplet currently occupies.
seatDidChange
@MainActor var seatDidChange: AnyPublisher<DropletLiveActivitySeat, Never> { get }
Fires whenever seat changes.
Methods
yield(reason:)
@MainActor func yield(reason: DropletLiveActivityYieldReason)
Gives up the seat until the droplet publishes a new state. Use this when the underlying task finished and the state publisher has not caught up yet.