mirror of
https://github.com/yattee/yattee.git
synced 2026-06-04 13:54:19 +00:00
Sync sidebar/tab bar/home layout per-platform via iCloud
Extends `SettingsKey.isPlatformSpecific` to cover home, tab bar, and sidebar layout, plus player details panel and video swipe actions, so iOS devices sync these with other iOS devices (and tvOS with tvOS, macOS with macOS) instead of overwriting each other via the shared iCloud key. Adds a one-shot migration that copies legacy unprefixed values into the new platform-prefixed slots locally and in iCloud, preserving protected-key timestamps.
This commit is contained in:
@@ -252,6 +252,12 @@ final class SettingsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// One-shot migration: move legacy unprefixed values for keys that became
|
||||
// platform-specific into their new iOS./macOS./tvOS. slots. Must run before
|
||||
// the initial iCloud refresh so it can seed the prefixed iCloud slot from the
|
||||
// current local value before any remote data is read.
|
||||
migrateLayoutKeysToPlatformPrefixed()
|
||||
|
||||
// Initial sync from iCloud to local storage (async to avoid blocking app launch)
|
||||
// This ensures local defaults have the latest iCloud values before any reads.
|
||||
// While sync is pending, suppress iCloud writes from set() to prevent stale
|
||||
|
||||
Reference in New Issue
Block a user