ThemeSettingsViewModel
class ThemeSettingsViewModel(preferences: ThemePreferencesRepository, seasonal: SeasonalThemeRepository, telemetryRepository: TelemetryRepository) : LoggedScreenViewModel<ThemeSettingsUiState, ThemeSettingsEvent> (source)
Owns theme-settings preference observation and mutations.
ThemeSettingsUiState.preferences stays Loadable.Loading until both the stored preferences and the seasonal themes unlock arrive, because the palette rows scroll to the first selection they see and the unlock can add palettes to them. A failed write shows an error message.
Constructors
Link copied to clipboard
constructor(preferences: ThemePreferencesRepository, seasonal: SeasonalThemeRepository, telemetryRepository: TelemetryRepository)