HotMessage

data class HotMessage(val id: String, val text: String, val expiresAtMs: Long?)

Transient, time-bounded message shown on top of a Live Activity (e.g. "Goal cancelled after VAR"). Mirrors the backend / iOS hotMessage ({ id, text, timestamp }, where timestamp is the Unix-epoch-seconds hard expiry). Visibility is the minimum of a local display cap and the backend expiry — matching the iOS behavior.

Constructors

Link copied to clipboard
constructor(id: String, text: String, expiresAtMs: Long?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Hard cutoff as epoch millis, or null when the backend sends no expiry.

Link copied to clipboard
val id: String
Link copied to clipboard

Functions

Link copied to clipboard
fun displayDurationMs(nowMs: Long = System.currentTimeMillis()): Long

Effective display duration (millis) from now: the smaller of the local cap (MAX_DISPLAY_MS) and the time remaining until expiresAtMs.