AboutViewModel
open class AboutViewModel(aboutRepository: AboutRepository, clipboardRepository: ClipboardRepository, telemetryRepository: TelemetryRepository, seasonalThemes: SeasonalThemeRepository) : LoggedScreenViewModel<AboutUiState, AboutEvent> (source)
ViewModel for the About screen, including tap-to-copy of the entries it renders.
Writing to the clipboard is a system UI interaction, so it happens on the main thread, which is where viewModelScope already runs. A successful copy is confirmed in-app only where the system does not confirm it itself (ClipboardRepository.confirmsCopies). A failed copy raises no system UI at all, so it is always reported.
The version-tap easter egg also unlocks the seasonal themes controls on the theme screen and the developer options entry in the advanced settings. The first unlock is announced, since nothing else points at where the reward went.
Parameters
clipboardRepository
Receives the copied entries, so this ViewModel holds no Context.
seasonalThemes
Records the easter egg unlock.
Constructors
Link copied to clipboard
constructor(aboutRepository: AboutRepository, clipboardRepository: ClipboardRepository, telemetryRepository: TelemetryRepository, seasonalThemes: SeasonalThemeRepository)