Methods

(static) deepCopyAA(source) → {object}

Deep copy an associative array (for state tracking)

Parameters:
NameTypeDescription
sourceobject
Returns:
Type: 
object

(static) deleteLibraryFromRegistry(libraryId) → {void}

Delete all settings for a library from registry

Parameters:
NameTypeDescription
libraryIdstring
Returns:
Type: 
void

(static) disableAutoSync() → {void}

Disable automatic syncing (settings reset uses this around its bulk rewrite) Safe to call more than once.

Returns:
Type: 
void

(static) enableAutoSync() → {void}

Enable automatic syncing of settings changes to registry Call this AFTER loading initial settings from registry/server Safe to call more than once.

Returns:
Type: 
void

(static) init() → {void}

Returns:
Type: 
void

(static) onDisplaySettingsChanged() → {void}

Called when displaySettings field changes Only syncs the specific settings that changed, not the entire object

Returns:
Type: 
void

(static) onSettingChanged(event) → {void}

Called when any individual setting field changes Observer is the single source of truth for registry sync IMPORTANT: Only syncs to registry - does not modify the node (prevents recursion)

DESIGN: Always save settings to registry, never delete This preserves user intent - if user explicitly sets a value to match the default, that's different from "never touched this setting". This is important for:

  • Future multi-device sync
  • Understanding what users have customized
  • "Reset all settings" feature can delete entire registry section
Parameters:
NameTypeDescription
eventobject
Returns:
Type: 
void

(static) syncChangedLibrarySettings(libraryId, oldSettings, newSettings) → {void}

Sync only changed settings for a library

Parameters:
NameTypeDescription
libraryIdstring
oldSettingsroAssociativeArray
newSettingsroAssociativeArray
Returns:
Type: 
void

(static) syncDisplaySettingsChanges(oldSettings, newSettings) → {void}

Sync only the display settings that changed

Parameters:
NameTypeDescription
oldSettingsroAssociativeArray
newSettingsroAssociativeArray
Returns:
Type: 
void

(static) syncLibrarySettings(libraryId, settings) → {void}

Sync all settings for a library (new library case)

Parameters:
NameTypeDescription
libraryIdstring
settingsobject
Returns:
Type: 
void