UsageAndDiagnosticsViewModel
class UsageAndDiagnosticsViewModel(repository: UsageAndDiagnosticsRepository, telemetryRepository: TelemetryRepository) : LoggedScreenViewModel<UsageAndDiagnosticsUiState, UsageAndDiagnosticsEvent> (source)
Shows and stores the reporting and consent choices for the usage and diagnostics screen and the onboarding page. The repository applies each stored choice to the consent SDKs, so this only follows and writes them. A failed read replaces the choices with a retryable failure; a failed write keeps them on screen and shows an error message.