feat: per-setting sync table with dynamic 8-colour theme
Redesign the settings screen into uniform rows (sync icon | name | value): dropdowns replace the chip pickers, every colour gets a reset to a canonical default, a per-row sync icon toggles that setting's cross-device sync, and a global switch flips all. Enabling a flag adopts this device's current value. - AppSettings/SettingsStore: add text/bg/line colours, cache_months, month_view_paged, and the account-wide sync_flags map (+ DEFAULT_SYNC, effective-merge on pull) - CalendarRepository.updateSettings: partial PUT of only the synced values plus the flag map (unsynced columns stay untouched server-side) - Theme: fully dynamic — primary/accent tint, background/text/line drive background/onBackground/outline (matching web); today/divider/label unchanged - add hide-profile (directory_hidden) to the profile block (parity with web/iOS) - language + text/line contrast stay device-local Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -62,12 +62,12 @@ class MainViewModel @Inject constructor(
|
||||
_route.value = computeRoute()
|
||||
}
|
||||
|
||||
/** Pull appearance settings from the server, caching them locally. */
|
||||
/** Pull settings from the server and merge them with local values honouring
|
||||
* each setting's sync flag (synced keys take the server value). */
|
||||
fun refreshSettings() {
|
||||
viewModelScope.launch {
|
||||
runCatching { repository.getSettings() }.onSuccess { s ->
|
||||
settingsStore.saveSettings(s)
|
||||
_settings.value = s
|
||||
_settings.value = settingsStore.applyServerPull(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user