User Story
As a Pyrycode mobile user on Android 12+, I want a "Use wallpaper colors" switch in Settings → Appearance, so I can opt into Material You and have the app pick colors from my system wallpaper.
Context
The Settings screen scaffolded in #64 shows an Appearance section. The Theme row (System / Light / Dark) and the picker dialog land in #86 and #87. This ticket adds a second row in the same section: a Material 3 switch labelled "Use wallpaper colors" that flips the use_wallpaper_colors preference established by the sibling plumbing ticket.
Per the project's Stack Decision → Color theming, this is Android 12+ only. On Android < 12, the switch is rendered disabled (greyed) with helper text "Requires Android 12 or newer" — discoverable but inert. Default is OFF, so the brand palette renders unless the user opts in.
Acceptance Criteria
Technical Notes
Depends On
Figma
https://www.figma.com/design/g2HIq2UyPhslEoHRokQmHG?node-id=17-2
The switch row lives in the Settings screen (node 17-2, established by #64) directly beneath the Theme row from #87. The switch itself has no Figma sub-node — implement with M3 Switch defaults. The disabled-with-helper-text variant for Android < 12 also has no Figma node; M3 disabled-row defaults plus the helper-text string in the AC are the spec. If the visual diverges meaningfully from M3 defaults later, a Figma-side ticket can capture it; for this slice, M3 defaults are the spec.
Size Estimate
S — switch row composable in SettingsScreen.kt (~30 LOC), SettingsViewModel.kt extension (~15 LOC), SettingsViewModelTest.kt additions (~25 LOC). ~45 LOC production.
Split from #75.
User Story
As a Pyrycode mobile user on Android 12+, I want a "Use wallpaper colors" switch in Settings → Appearance, so I can opt into Material You and have the app pick colors from my system wallpaper.
Context
The Settings screen scaffolded in #64 shows an Appearance section. The Theme row (System / Light / Dark) and the picker dialog land in #86 and #87. This ticket adds a second row in the same section: a Material 3 switch labelled "Use wallpaper colors" that flips the
use_wallpaper_colorspreference established by the sibling plumbing ticket.Per the project's Stack Decision → Color theming, this is Android 12+ only. On Android < 12, the switch is rendered disabled (greyed) with helper text "Requires Android 12 or newer" — discoverable but inert. Default is OFF, so the brand palette renders unless the user opts in.
Acceptance Criteria
Switch.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S): the switch is enabled; its checked state mirrorsAppPreferences.useWallpaperColors; toggling it persists viaAppPreferences.setUseWallpaperColors(...)and the app'sColorSchemeupdates immediately without a process restart (the plumbing ticket already wires the flow into the composition root).SettingsViewModel(introduced by feat(ui): Settings theme picker dialog (System / Light / Dark) #87) gains auseWallpaperColors: StateFlow<Boolean>exposing the persisted value, and an event entry point for toggling. The Settings composable remains a thin state + event consumer per the project's MVI convention.SettingsViewModelTestcovers: initial state mirrorsAppPreferences.useWallpaperColors; toggling persists via the fake; the exposed flow re-emits after persistence.Technical Notes
Build.VERSION.SDK_INT) and passed into the row as anenabled: Booleanparameter — no need to expose the SDK level on the ViewModel.Depends On
use_wallpaper_colorsDataStore key onAppPreferencesand theColorSchemebranch in the composition root must land first.SettingsViewModelintroduced there.Figma
https://www.figma.com/design/g2HIq2UyPhslEoHRokQmHG?node-id=17-2
The switch row lives in the Settings screen (node
17-2, established by #64) directly beneath the Theme row from #87. The switch itself has no Figma sub-node — implement with M3Switchdefaults. The disabled-with-helper-text variant for Android < 12 also has no Figma node; M3 disabled-row defaults plus the helper-text string in the AC are the spec. If the visual diverges meaningfully from M3 defaults later, a Figma-side ticket can capture it; for this slice, M3 defaults are the spec.Size Estimate
S — switch row composable in
SettingsScreen.kt(~30 LOC),SettingsViewModel.ktextension (~15 LOC),SettingsViewModelTest.ktadditions (~25 LOC). ~45 LOC production.Split from #75.