AdvancedSettingsViewModel

class AdvancedSettingsViewModel(repository: CacheRepository, telemetryRepository: TelemetryRepository, developerOptionsUnlocked: Flow<Boolean> = flowOf(false)) : LoggedScreenViewModel<AdvancedSettingsUiState, AdvancedSettingsEvent> (source)

ViewModel for the advanced settings page: clearing the cache, and whether the developer options are offered.

CacheRepository moves its own file work off the main thread, so this needs no dispatcher. A clear confirms with a message, and a failed one reports with an error message while the rows stay.

Parameters

developerOptionsUnlocked

Whether the About screen's version easter egg has been found, which offers the developer options here.

Constructors

Link copied to clipboard
constructor(repository: CacheRepository, telemetryRepository: TelemetryRepository, developerOptionsUnlocked: Flow<Boolean> = flowOf(false))

Properties

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

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