mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-15 16:45:46 +00:00
7ceac22dc0
Two clarity fixes from the audit.
- ChatWallpaper: the private color helper was named gen — too short to
carry its purpose. Rename to colorForElement, the term it actually
computes (a single oklch Color from preset + mode + element params).
- Appearance.FormulaDevTools: both the generateScheme dispatch and the
slider rendering branched via `when { isLight -> ; isBlack -> ; else
-> dark }` and `if (isLight) { } else { ; if (!isBlack) ... }`. Two
parallel dispatches over the same proposition, expressed as boolean
pairs. DefaultTheme already carries that proposition with a name;
switch to `when (baseTheme)` so each branch states which theme it is
and lists its sliders / scheme call. Black's three-slider set becomes
its own branch instead of negative gates inside the dark branch.
The isLight/isBlack locals stay for the small conditionals inside the
defaults map computation (where the ternaries read fine inline).
Pure refactor — no behavior change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>