SupportViewModel

ViewModel for the support page: the donation options, and the purchase of one.

BillingRepository is main-safe, so this needs no dispatcher. It reports a failed product query through BillingRepository.purchaseResult instead of throwing, so a failure that arrives before any options have loaded becomes the page's failure state with a retry. Once the options show, a failed purchase is a message and the options stay.

Constructors

Link copied to clipboard
constructor(billingRepository: BillingRepository, telemetryRepository: TelemetryRepository)

Properties

Link copied to clipboard
val messages: StateFlow<ImmutableList<UiMessage>>
Link copied to clipboard
val state: StateFlow<SupportUiState>

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun onEvent(event: SupportEvent)