package com.rippr import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow /** * Last-seen upload failure, surfaced on the recording screen. * * Unlike recording state — which now lives in the database because it must survive * process death — this is genuinely ephemeral. A stale error from a previous process * would be misleading, so losing it on restart is the correct behaviour. */ object UploadStatus { private val _lastError = MutableStateFlow(null) val lastError: StateFlow = _lastError.asStateFlow() fun setError(message: String?) { _lastError.value = message } }